summaryrefslogtreecommitdiffstats
path: root/contrib/sendmail/test/t_seteuid.c
diff options
context:
space:
mode:
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