Searched refs:setgid (Results 1 - 25 of 72) sorted by relevance

123

/freebsd-11-stable/contrib/sendmail/test/
H A Dt_setgid.c12 ** This program checks to see if your version of setgid works.
58 res = setgid(effgid);
61 printf("setgid(%d)=%d %s\n", (int) effgid, res,
66 printgids("after setgid()", effgid, effgid);
82 if (setgid(0) == 0)
85 printf("MAYDAY! setgid(0) succeeded (should have failed)\n");
89 printf("setgid(0) failed (this is correct)\n");
91 printgids("after setgid(0)", effgid, effgid);
111 "setgid"
117 printf("\nIt is possible to use setgid o
[all...]
H A Dt_dropgid.c12 ** This program checks to see if your version of setgid works.
49 # define SETGIDCALL "setgid"
94 res = setgid(realgid);
95 printf("setgid(%d)=%d %s\n", (int) realgid, res,
97 printgids("after setgid()", realgid, realgid);
112 if (setgid(effgid) == 0)
115 printf("MAYDAY! setgid(%d) succeeded (should have failed)\n",
120 printf("setgid(%d) failed (this is correct)\n", effgid);
122 printgids("after setgid() to egid", realgid, realgid);
/freebsd-11-stable/contrib/tcp_wrappers/
H A Dsafe_finger.c68 setgid(pwd->pw_gid);
71 setgid(UNPRIV_UGID);
/freebsd-11-stable/contrib/netbsd-tests/lib/libc/gen/
H A Dt_getgrent.c135 * even without the setgid(2) check.
154 rv = setgid(gr->gr_gid);
/freebsd-11-stable/crypto/openssh/openbsd-compat/
H A Dbsd-setres_id.c51 if (setgid(rgid) < 0) {
53 error("setgid %u: %.100s", rgid, strerror(errno));
/freebsd-11-stable/contrib/netbsd-tests/lib/libc/sys/
H A Dt_issetugid.c121 if (check(NULL, setgid) != true)
H A Dt_getgroups.c97 atf_tc_set_md_var(tc, "descr", "Test setgid(2) from getgroups(2)");
108 * Check that we can setgid(2)
121 rv = setgid(gidset[i]);
/freebsd-11-stable/crypto/heimdal/kdc/
H A Dmain.c85 if (setgid(pw->pw_gid) < 0)
86 err(1, "setgid(%s) failed", runas_string);
/freebsd-11-stable/contrib/dma/
H A Ddma-mbox-create.c103 if (setgid(mail_gid) != 0)
/freebsd-11-stable/crypto/openssh/
H A Duidswap.c120 if (setgid(getegid()) < 0)
121 debug("setgid %u: %.100s", (u_int) getegid(), strerror(errno));
193 setgid(getgid());
225 * OS X requires initgroups after setgid to opt back into
239 (setgid(old_gid) != -1 || setegid(old_gid) != -1))
/freebsd-11-stable/contrib/amd/hlfsd/
H A Dhomedir.c173 if ((old_groupid = setgid(groupid)) < 0) {
174 plog(XLOG_WARNING, "could not setgid to %d: %m", groupid);
179 setgid(old_groupid);
187 setgid(old_groupid);
194 setgid(old_groupid);
210 setgid(old_groupid);
215 setgid(old_groupid);
/freebsd-11-stable/usr.sbin/chroot/
H A Dchroot.c159 if (group && setgid(gid) == -1)
160 err(1, "setgid");
/freebsd-11-stable/usr.sbin/bluetooth/sdpd/
H A Dmain.c194 if (setgid(gid) < 0) {
195 log_err("Could not setgid(%s). %s (%d)",
/freebsd-11-stable/contrib/openpam/bin/su/
H A Dsu.c164 if (setgid(pwd->pw_gid) == -1) {
165 warn("setgid()");
/freebsd-11-stable/contrib/sendmail/libsm/
H A Dmpeix.c354 ** - setuid/setgid file permission bits exist but have no-op functionality
355 ** - setgid() exists, but only supports new gid == current gid (boring!)
366 ** gid/uid management functions getegid(), geteuid(), setgid(), and
375 ** This emulation model is activated by use of the program file setgid and
376 ** setuid mode bits which exist but are unused by MPE. If the setgid mode
437 ** if the setgid bit is on, we want gid emulation and so set
548 ** SENDMAIL_MPE_SETGID -- shadow function for setgid()
550 ** Simulate a call to setgid() without actually calling the real
554 ** implicit real setgid() to the proper primary gid. So it doesn't matter
565 #undef setgid macro
[all...]
/freebsd-11-stable/usr.bin/finger/
H A Dfinger.c168 if (setgid(pw->pw_gid) != 0)
169 err(1, "setgid()");
173 if (setgid(UNPRIV_UGID) != 0)
174 err(1, "setgid()");
/freebsd-11-stable/sys/kern/
H A Dcapabilities.conf602 setgid
/freebsd-11-stable/sys/compat/freebsd32/
H A Dcapabilities.conf239 setgid
/freebsd-11-stable/usr.bin/newgrp/
H A Dnewgrp.c139 setres = setgid(pwd->pw_gid);
145 warn("setgid");
217 if (setgid(grp->gr_gid)) {
219 warn("setgid");
/freebsd-11-stable/release/picobsd/tinyware/passwd/
H A Dpw_util.c210 (void)setgid(getgid());
/freebsd-11-stable/tools/regression/priv/
H A Dpriv_cred.c94 error = setgid(GID_OTHER);
/freebsd-11-stable/contrib/openbsm/bin/auditdistd/
H A Dsandbox.c165 if (setgid(pw->pw_gid) == -1) {
222 "Privileges successfully dropped using %s%s+setgid+setuid.",
/freebsd-11-stable/usr.sbin/jexec/
H A Djexec.c123 if (setgid(pwd->pw_gid) != 0)
124 err(1, "setgid");
/freebsd-11-stable/usr.sbin/cron/cron/
H A Dpopen.c180 if (setgid(e->gid) != 0)
/freebsd-11-stable/contrib/llvm-project/lldb/source/Host/posix/
H A DProcessLauncherPosixFork.cpp138 // Do not inherit setgid powers.
139 if (setgid(getgid()) != 0)
140 ExitWithError(error_fd, "setgid");

Completed in 279 milliseconds

123