Leon Panetta, the departing secretary of defense, took an important step on Monday to improve treatment of gay and lesbian military personnel and their families. He announced a limited expansion of benefits for same-sex partners, like access to military commissaries, gyms and various family-support programs on bases and posts. Same-sex partners will now be eligible for identification cards to allow them on base. Gay couples who are both in the military will be entitled to the same consideration for joint-duty assignments as other couples. Granting other benefits like burial rights at national cemeteries and eligibility for on-base family housing are said to remain under consideration. The announcement adds to Mr. Panetta’s solid record on equality during his time at the Pentagon. But the deplorable 1996 Defense of Marriage Act, which prevents the federal government from recognizing same-sex marriages, stands in the way of full benefits like health care coverage and off-base housing allowances. And even though the Pentagon’s “don’t ask, don’t tell” policy ended in 2011, soldiers in same-sex unions are not eligible for the military’s family separation allowance when they are deployed away from their spouse.