[dovecot-cvs] dovecot/src/lib compat.c, 1.18, 1.19 compat.h, 1.24,
1.25
cras at dovecot.org
cras at dovecot.org
Fri Oct 8 16:33:05 EEST 2004
Update of /var/lib/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv6772/src/lib
Modified Files:
compat.c compat.h
Log Message:
Add seteuid() wrapper for HP-UX
Index: compat.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/compat.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- compat.c 8 Nov 2003 14:23:41 -0000 1.18
+++ compat.c 8 Oct 2004 13:33:03 -0000 1.19
@@ -160,3 +160,15 @@
return pwrite(fd, buf, count, offset);
}
#endif
+
+#ifndef HAVE_SETEUID
+int my_seteuid(uid_t euid)
+{
+#ifdef HAVE_SETREUID
+ /* HP-UX at least doesn't have seteuid() but has setreuid() */
+ return setreuid(-1, euid);
+#else
+# error Missing seteuid functionality
+#endif
+}
+#endif
Index: compat.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/compat.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- compat.h 27 Apr 2004 20:25:52 -0000 1.24
+++ compat.h 8 Oct 2004 13:33:03 -0000 1.25
@@ -108,6 +108,10 @@
ssize_t my_pwrite(int fd, const void *buf, size_t count, off_t offset);
#endif
+#ifndef HAVE_SETEUID
+int my_seteuid(uid_t euid);
+#endif
+
/* ctype.h isn't safe with signed chars,
use our own instead if really needed */
#define i_toupper(x) ((char) toupper((int) (unsigned char) (x)))
More information about the dovecot-cvs
mailing list