If not root and not setuid, print warning.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21179 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2007-06-19 15:16:41 +00:00
parent 8781770e97
commit f2822370c3

View File

@@ -440,6 +440,9 @@ main(int argc, char **argv)
else
su_user = argv[optind++];
if (!issuid() && getuid() != 0)
warnx("Not setuid and you are root, expect this to fail");
pwd = k_getpwnam(su_user);
if(pwd == NULL)
errx (1, "unknown login %s", su_user);