Print this page
Reduce lint

*** 846,858 **** * Get the app-svc-dependent flag for this zone's init process. This is a * zone-specific attr which controls the type of contract we create for the * zone's init. When true, the contract will include CT_PR_EV_EXIT in the fatal * set, so that when any service which is in the same contract exits, the init * application will be terminated. */ static boolean_t ! is_app_svc_dep(brand_handle_t bh) { struct zone_attrtab a; bzero(&a, sizeof (a)); (void) strlcpy(a.zone_attr_name, "app-svc-dependent", --- 846,860 ---- * Get the app-svc-dependent flag for this zone's init process. This is a * zone-specific attr which controls the type of contract we create for the * zone's init. When true, the contract will include CT_PR_EV_EXIT in the fatal * set, so that when any service which is in the same contract exits, the init * application will be terminated. + * + * We use the global "snap_hndl", so no parameters get passed here. */ static boolean_t ! is_app_svc_dep(void) { struct zone_attrtab a; bzero(&a, sizeof (a)); (void) strlcpy(a.zone_attr_name, "app-svc-dependent",
*** 938,948 **** /* * See if we need to setup contract dependencies between the zone's * primary application and any of its services. */ ! app_svc_dep = is_app_svc_dep(bh); brand_close(bh); err = filter_bootargs(zlogp, bootargs, nbootargs, init_file); if (err != Z_OK) --- 940,950 ---- /* * See if we need to setup contract dependencies between the zone's * primary application and any of its services. */ ! app_svc_dep = is_app_svc_dep(); brand_close(bh); err = filter_bootargs(zlogp, bootargs, nbootargs, init_file); if (err != Z_OK)
*** 964,976 **** if (lstat(initpath, &st) == -1) { zerror(zlogp, B_TRUE, "could not stat %s", initpath); goto bad; } ! if ((st.st_mode & S_IFMT) == S_IFLNK) { ! /* symlink, we'll have to wait and resolve when we boot */ ! } else if ((st.st_mode & S_IXUSR) == 0) { zerror(zlogp, B_FALSE, "%s is not executable", initpath); goto bad; } /* --- 966,980 ---- if (lstat(initpath, &st) == -1) { zerror(zlogp, B_TRUE, "could not stat %s", initpath); goto bad; } ! /* ! * If a symlink, we'll have to wait and resolve when we boot, ! * otherwise check the executable bits now. ! */ ! if ((st.st_mode & S_IFMT) != S_IFLNK && (st.st_mode & S_IXUSR) == 0) { zerror(zlogp, B_FALSE, "%s is not executable", initpath); goto bad; } /*
*** 1294,1304 **** ucred_t *uc = NULL; const priv_set_t *eset; zone_state_t zstate; zone_cmd_t cmd; - boolean_t debug; int init_status; zone_cmd_arg_t *zargp; boolean_t kernelcall; --- 1298,1307 ----
*** 1348,1358 **** "unexpected (expected %d bytes)", alen, sizeof (zone_cmd_arg_t)); goto out; } cmd = zargp->cmd; - debug = zargp->debug; init_status = zargp->status; if (door_ucred(&uc) != 0) { zerror(&logsys, B_TRUE, "door_ucred"); goto out; --- 1351,1360 ----