]> granicus.if.org Git - sudo/commitdiff
finished
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 6 Feb 1994 00:30:13 +0000 (00:30 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 6 Feb 1994 00:30:13 +0000 (00:30 +0000)
PORTING

diff --git a/PORTING b/PORTING
index 351d2e79e7c899caa3de3ea0a8b598e5e8d42c8e..9d8e86cf2c8a6026767f99c4a63aabc176936ff7 100644 (file)
--- a/PORTING
+++ b/PORTING
@@ -1,10 +1,23 @@
+sudo porting hints:
+
 Sudo should be fairly easy to port.  The most problematic part is how
 set*uid() functions.  For systems that support saved uids you should
-define HAS_SAVED_UID.  This means that for most of sudo, it is running
-with the effective and real uids set to the uid of the caller.  The saved
-uid of 0 is used to do a setuid(0) before exec'ing the command.  If saved
-uids are not supported, only the effective uid is set the the uid of the
-caller.  If you have saved uids, sudo needs a setreuid() function, otherwise
-it uses seteuid().  If you have no setreuid() or seteuid() but do have
+define HAS_SAVED_UID if an only if you can do a setuid(0) when only your
+saved uid is 0.  This way most of sudo is running with the effective
+and real uids set to the uid of the caller.  The saved uid of 0 is used
+to do a setuid(0) before exec'ing the command.
+
+If saved uids are not supported, only the effective uid is set the the uid
+of the caller.  If you have saved uids, sudo needs a setreuid() function,
+otherwise it uses seteuid().  If you have no setreuid() or seteuid() but do have
 setresuid() you can emulate setreuid() with a macro like the one in
 sudo.h used for HP-UX.
+
+Another possible pitfall is getdtablesize() which is used to get the maximum
+number of open files the process can have.  For systems that have the
+Posix(?) sysconf() but no getdtablesize(), use the following macro:
+    :#define getdtablesize()   (sysconf(_SC_OPEN_MAX))
+If all else fails you can use the value of NOFILE in <sys/param.h>.
+
+If you port sudo to a new architecture, please send your changes to
+    sudo-bugs@cs.colorado.edu