summaryrefslogtreecommitdiffstats
path: root/contrib/sendmail/test/t_seteuid.c
diff options
context:
space:
mode:
authorgshapiro <gshapiro@FreeBSD.org>2000-08-12 21:55:49 +0000
committergshapiro <gshapiro@FreeBSD.org>2000-08-12 21:55:49 +0000
commitc3cd75415d60bc002b20182ffd3383ea9e901a80 (patch)
tree211dfd0f771f89d6abe14fa94cab53985a9d0116 /contrib/sendmail/test/t_seteuid.c
parent231592eb7942ebd4becae24ea8e018acea3742a9 (diff)
parent4332139a9a11f773ffe5109bed871561e3c290a1 (diff)
downloadFreeBSD-src-c3cd75415d60bc002b20182ffd3383ea9e901a80.zip
FreeBSD-src-c3cd75415d60bc002b20182ffd3383ea9e901a80.tar.gz
This commit was generated by cvs2svn to compensate for changes in r64562,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/sendmail/test/t_seteuid.c')
-rw-r--r--contrib/sendmail/test/t_seteuid.c30
1 files changed, 19 insertions, 11 deletions
diff --git a/contrib/sendmail/test/t_seteuid.c b/contrib/sendmail/test/t_seteuid.c
index f3bd529..b912b60 100644
--- a/contrib/sendmail/test/t_seteuid.c
+++ b/contrib/sendmail/test/t_seteuid.c
@@ -15,11 +15,27 @@
#include <unistd.h>
#include <stdio.h>
+#ifndef lint
+static char id[] = "@(#)$Id: t_seteuid.c,v 8.4 1999/08/28 00:25:28 gshapiro Exp $";
+#endif /* ! lint */
+
#ifdef __hpux
-#define seteuid(e) setresuid(-1, e, -1)
-#endif
+# define seteuid(e) setresuid(-1, e, -1)
+#endif /* __hpux */
+
+static void
+printuids(str, r, e)
+ char *str;
+ int r, e;
+{
+ printf("%s (should be %d/%d): r/euid=%d/%d\n", str, r, e,
+ getuid(), geteuid());
+}
-main()
+int
+main(argc, argv)
+ int argc;
+ char **argv;
{
int fail = 0;
uid_t realuid = getuid();
@@ -111,11 +127,3 @@ main()
printf("\nIt is safe to define USESETEUID on this system\n");
exit(0);
}
-
-printuids(str, r, e)
- char *str;
- int r, e;
-{
- printf("%s (should be %d/%d): r/euid=%d/%d\n", str, r, e,
- getuid(), geteuid());
-}
OpenPOWER on IntegriCloud