diff lib/lib.h @ 1156:faf7117c4489 draft

Fix some issues raised (albeit indirectly) by Isaac Dunham. POLL_IN defined as a constant by some libc. Factor out login.c's change_identity() to xwrap.c as xsetuser(). Replace xsetuid() with xsetuser() Put a space between argument globals and non-argument globals. TT starts zeroed, don't need to re-zero entries in it. STDIN_FILENO has been 0 since 1969, even DOS copied that. Just say 0. Added an xchroot() using xchdir() to lib/xwrap.c. Remove endgrent() call until somebody can explain why it was there.
author Rob Landley <rob@landley.net>
date Mon, 23 Dec 2013 06:49:38 -0600
parents 80c9df5145fe
children 8afe1fde9314
line wrap: on
line diff
--- a/lib/lib.h	Sun Dec 22 20:15:54 2013 -0600
+++ b/lib/lib.h	Mon Dec 23 06:49:38 2013 -0600
@@ -109,11 +109,12 @@
 char *xabspath(char *path, int exact);
 char *xrealpath(char *path);
 void xchdir(char *path);
+void xchroot(char *path);
 void xmkpath(char *path, int mode);
-void xsetuid(uid_t uid);
 struct passwd *xgetpwuid(uid_t uid);
 struct group *xgetgrgid(gid_t gid);
 struct passwd *xgetpwnam(char *name);
+void xsetuser(struct passwd *pwd);
 char *xreadlink(char *name);
 long xparsetime(char *arg, long units, long *fraction);
 void xpidfile(char *name);