Parenthesize return values.
This commit is contained in:
parent
acbcfa5fb2
commit
ab560b6812
@ -187,7 +187,7 @@ substvar(const char * var, const struct passwd * pwd, int hlen, int pch, int nle
|
||||
}
|
||||
}
|
||||
|
||||
return np;
|
||||
return (np);
|
||||
}
|
||||
|
||||
|
||||
@ -311,7 +311,7 @@ list2cpuset(const char *list, cpuset_t *mask)
|
||||
case DASH:
|
||||
return (0);
|
||||
}
|
||||
return 1;
|
||||
return (1);
|
||||
}
|
||||
|
||||
|
||||
@ -370,7 +370,7 @@ setclasscontext(const char *classname, unsigned int flags)
|
||||
|
||||
rc = lc ? setusercontext(lc, NULL, 0, flags) : -1;
|
||||
login_close(lc);
|
||||
return rc;
|
||||
return (rc);
|
||||
}
|
||||
|
||||
|
||||
@ -400,7 +400,7 @@ setlogincontext(login_cap_t *lc, const struct passwd *pwd,
|
||||
if (flags & LOGIN_SETCPUMASK)
|
||||
setclasscpumask(lc);
|
||||
}
|
||||
return mymask;
|
||||
return (mymask);
|
||||
}
|
||||
|
||||
|
||||
@ -470,13 +470,13 @@ setusercontext(login_cap_t *lc, const struct passwd *pwd, uid_t uid, unsigned in
|
||||
if (setgid(pwd->pw_gid) != 0) {
|
||||
syslog(LOG_ERR, "setgid(%lu): %m", (u_long)pwd->pw_gid);
|
||||
login_close(llc);
|
||||
return -1;
|
||||
return (-1);
|
||||
}
|
||||
if (initgroups(pwd->pw_name, pwd->pw_gid) == -1) {
|
||||
syslog(LOG_ERR, "initgroups(%s,%lu): %m", pwd->pw_name,
|
||||
(u_long)pwd->pw_gid);
|
||||
login_close(llc);
|
||||
return -1;
|
||||
return (-1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -490,7 +490,7 @@ setusercontext(login_cap_t *lc, const struct passwd *pwd, uid_t uid, unsigned in
|
||||
if (mac_from_text(&label, label_string) == -1) {
|
||||
syslog(LOG_ERR, "mac_from_text('%s') for %s: %m",
|
||||
pwd->pw_name, label_string);
|
||||
return -1;
|
||||
return (-1);
|
||||
}
|
||||
if (mac_set_proc(label) == -1)
|
||||
error = errno;
|
||||
@ -500,7 +500,7 @@ setusercontext(login_cap_t *lc, const struct passwd *pwd, uid_t uid, unsigned in
|
||||
if (error != 0) {
|
||||
syslog(LOG_ERR, "mac_set_proc('%s') for %s: %s",
|
||||
label_string, pwd->pw_name, strerror(error));
|
||||
return -1;
|
||||
return (-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -509,7 +509,7 @@ setusercontext(login_cap_t *lc, const struct passwd *pwd, uid_t uid, unsigned in
|
||||
if ((flags & LOGIN_SETLOGIN) && setlogin(pwd->pw_name) != 0) {
|
||||
syslog(LOG_ERR, "setlogin(%s): %m", pwd->pw_name);
|
||||
login_close(llc);
|
||||
return -1;
|
||||
return (-1);
|
||||
}
|
||||
|
||||
mymask = (flags & LOGIN_SETUMASK) ? umask(LOGIN_DEFUMASK) : 0;
|
||||
@ -519,7 +519,7 @@ setusercontext(login_cap_t *lc, const struct passwd *pwd, uid_t uid, unsigned in
|
||||
/* This needs to be done after anything that needs root privs */
|
||||
if ((flags & LOGIN_SETUSER) && setuid(uid) != 0) {
|
||||
syslog(LOG_ERR, "setuid(%lu): %m", (u_long)uid);
|
||||
return -1; /* Paranoia again */
|
||||
return (-1); /* Paranoia again */
|
||||
}
|
||||
|
||||
/*
|
||||
@ -534,5 +534,5 @@ setusercontext(login_cap_t *lc, const struct passwd *pwd, uid_t uid, unsigned in
|
||||
if (flags & LOGIN_SETUMASK)
|
||||
umask(mymask);
|
||||
|
||||
return 0;
|
||||
return (0);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user