Project

General

Profile

Bug #73 » zoneproxyd.c.patch

Patch for IPS - Igor Pashev, 2013-01-06 03:44 PM

View differences:

src/zoneproxy/zoneproxyd/zoneproxyd.c Mon Dec 03 17:42:22 2012 +0400 → src/zoneproxy/zoneproxyd/zoneproxyd.c Mon Dec 03 17:42:56 2012 +0400
1210 1210
	drop_privs();
1211 1211
}
1212 1212

  
1213
static int
1214
zone_get_zoneids(zoneid_t **zonelist, uint_t *numzones)
1215
{
1216
   zoneid_t        *zids = NULL;
1217
   uint_t          nzids = 0;
1218

  
1219
   if (zone_list(NULL, &nzids) != 0)
1220
       return (errno);
1221

  
1222
   if (numzones)
1223
       *numzones = nzids;
1224

  
1225
   if (zonelist == NULL)
1226
       return 0;
1227

  
1228
   if ((zids = malloc(nzids * sizeof (zoneid_t))) == NULL)
1229
       return (errno);
1230

  
1231
   if (zone_list(zids, &nzids) != 0) {
1232
       free(zids);
1233
       return (errno);
1234
   }
1235

  
1236
   *zonelist = zids;
1237

  
1238
   return 0;
1239
}
1240

  
1241

  
1213 1242
static void
1214 1243
fattach_all_zones(boolean_t detach_only)
1215 1244
{
(2-2/2)