Here is the text of Pres. Obama's statement, President’s Signing Statement on National Defense Authorization Act (text and brief comment by Marty Lederman; Opinio Juris, 31 Dec 2011) [from presidential statement as to key provisions in Secs. 1021 & 1022):

Section 1021 affirms the executive branch’s authority to detain persons covered by the 2001 Authorization for Use of Military Force (AUMF) (Public Law 107-40; 50 U.S.C. 1541 note). This section breaks no new ground and is unnecessary. The authority it describes was included in the 2001 AUMF, as recognized by the Supreme Court and confirmed through lower court decisions since then. Two critical limitations in section 1021 confirm that it solely codifies established authorities. First, under section 1021(d), the bill does not “limit or expand the authority of the President or the scope of the Authorization for Use of Military Force.” Second, under section 1021(e), the bill may not be construed to affect any “existing law or authorities relating to the detention of United States citizens, lawful resident aliens of the United States, or any other persons who are captured or arrested in the United States.” My Administration strongly supported the inclusion of these limitations in order to make clear beyond doubt that the legislation does nothing more than confirm authorities that the Federal courts have recognized as lawful under the 2001 AUMF. Moreover, I want to clarify that my Administration will not authorize the indefinite military detention without trial of American citizens. Indeed, I believe that doing so would break with our most important traditions and values as a Nation. My Administration will interpret section 1021 in a manner that ensures that any detention it authorizes complies with the Constitution, the laws of war, and all other applicable law.

Section 1022 seeks to require military custody for a narrow category of non-citizen detainees who are “captured in the course of hostilities authorized by the Authorization for Use of Military Force.” This section is ill-conceived and will do nothing to improve the security of the United States. The executive branch already has the authority to detain in military custody those members of al-Qa’ida who are captured in the course of hostilities authorized by the AUMF, and as Commander in Chief I have directed the military to do so where appropriate. I reject any approach that would mandate military custody where law enforcement provides the best method of incapacitating a terrorist threat. While section 1022 is unnecessary and has the potential to create uncertainty, I have signed the bill because I believe that this section can be interpreted and applied in a manner that avoids undue harm to our current operations.

I have concluded that section 1022 provides the minimally acceptable amount of flexibility to protect national security. Specifically, I have signed this bill on the understanding that section 1022 provides the executive branch with broad authority to determine how best to implement it, and with the full and unencumbered ability to waive any military custody requirement, including the option of waiving appropriate categories of cases when doing so is in the national security interests of the United States. As my Administration has made clear, the only responsible way to combat the threat al-Qa’ida poses is to remain relentlessly practical, guided by the factual and legal complexities of each case and the relative strengths and weaknesses of each system. Otherwise, investigations could be compromised, our authorities to hold dangerous individuals could be jeopardized, and intelligence could be lost. I will not tolerate that result, and under no circumstances will my Administration accept or adhere to a rigid across-the-board requirement for military detention. I will therefore interpret and implement section 1022 in the manner that best preserves the same flexible approach that has served us so well for the past 3 years and that protects the ability of law enforcement professionals to obtain the evidence and cooperation they need to protect the Nation.
It brought on a two-part comment (by folks who are centrists on the left side of that "section" of the political spectrum) - generally favorable to the Obama administration's detention policies, though with reservations if "some bad guy" gets into power.

The NDAA: The Good, the Bad, and the Laws of War–Part I (Marty Lederman and Steve Vladeck; Opinio Juris, 31 Dec 2011); and

The NDAA: The Good, the Bad, and the Laws of War–Part II (Marty Lederman and Steve Vladeck; Opinio Juris, 31 Dec 2011).

In response, a position further left, Detention Under the NDAA and the Limits of Analogy (Kevin Jon Heller; Opinio Juris, 31 Dec 2011).

Frankly, all three of these authors are based in the premise that there is a brooding, international omnipresence in the sky - call it the Laws of War (or the Law of Armed Conflict, or International Humanitarian Law). And that, that omnipresence controls all national laws on that subject. In some countries, their national "Basic Laws" do require that result (e.g., Israel and Germany); or that result is required by very broad treaties and other interstate compacts (e.g, as in the EU generally).

In the US, the international "laws of war" become applicable only when they are adopted by the constitutionally empowered branch(es) of government, as in the following graphic:

I Law Flow 01.jpg

Given the unsettled state of international law with respect to detention (see OP in this thread) - especially in conflicts not of an international character (not between states), looking for a brooding omnipresence in the sky is a fool's mission.

Regards

Mike