First a military commision designates who is and who isn't a POW. The Bush administration decided to get around all that by making up the designation of "unlawful enemy combatant" and the Obama administraton is now forced to sort that out years later. Then, once designated a POW we can detain the person for the legnth of the conflict. What could pose a political problem for the administration is that POWs are supposed to be held in humane - very humane - conditions. They are not charged with a crime. The principle is that they're being held to keep them off the battlefield. They wouldn't have to go as far as we did during WWII with some Italian POWs held in the NY area. Some of them got furloughs to go visit Little Italy. We probably wouldn't be doing that. But they should properly be kept in better conditions than prisoners who have been convicted of a crime.
It's not pretty, but it's not ad hoc either. There are complications due to the fact that this conflict is of a different nature, of course. For one thing, if you're designated a POW and the conflict is an insurgency, you could be detained for a long, long time. If the previous administration had been interested in the rule of law everything would be in place by now, but it was more interested in getting around the law. That is one of the many huge differences between the Obama and Bush administrations.