diff src/syscalls.cc @ 2472:0c788e9b53b8

[project @ 1996-11-06 04:10:07 by jwe]
author jwe
date Wed, 06 Nov 1996 04:12:18 +0000
parents 5be3f6f5986a
children bb0c213e5885
line wrap: on
line diff
--- a/src/syscalls.cc	Tue Nov 05 21:55:53 1996 +0000
+++ b/src/syscalls.cc	Wed Nov 06 04:12:18 1996 +0000
@@ -309,6 +309,40 @@
   return retval;
 }
 
+DEFUN (geteuid, , ,
+  "uid = geteuid (): return the effective user id of the current process")
+{
+  double retval = -1.0;
+
+#if defined (HAVE_GETEUID)
+  int nargin = args.length ();
+
+  if (nargin == 0)
+    retval = geteuid ();
+  else
+    print_usage ("geteuid");
+#else
+  gripe_not_supported ("geteuid");
+#endif
+}
+
+DEFUN (getuid, , ,
+  "uid = getuid (): return the real user id of the current process")
+{
+  double retval = -1.0;
+
+#if defined (HAVE_GETUID)
+  int nargin = args.length ();
+
+  if (nargin == 0)
+    retval = getuid ();
+  else
+    print_usage ("getuid");
+#else
+  gripe_not_supported ("getuid");
+#endif
+}
+
 DEFUN (lstat, args, ,
   "[S, ERR, MSG] = lstat (NAME)\n\
 \n\