[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Pseteuid/Psetegid errors in 1.11h2



 Ok, I don't use 1.11h2, but I've been reported that it causes problems
with ftpd. Reason seems to be that the newer Psetreuid routines just
return 0 in case of no error. Ok, how are they supposed to distinguish
which id to return, but the 'old' Pseteuid always did this. Since ftpd
relies on this, there's a small fix appended, relative to 1.11h2.

bye,
TeSche
-- 
Torsten Scherer (Schiller, TeSche...), itschere@techfak.uni-bielefeld.de
Faculty of Technology, University of Bielefeld, Germany, Europe, Earth...
| Use any of "finger itschere@129.70.131.2-15" for adresses and more	|
| Last updated: 10th October 1994					|

--- dos.c.orig	Fri Oct 21 14:32:54 1994
+++ dos.c	Fri Oct 21 14:36:42 1994
@@ -275,14 +275,22 @@
 p_seteuid(euid)
 	int euid;
 {
-	return (p_setreuid (-1, euid));
+	if (!p_setreuid (-1, euid)) {
+		return euid;
+	}
+
+	return EACCDN;
 }
 	
 long ARGS_ON_STACK
 p_setegid(egid)
 	int egid;
 {
-	return (p_setregid (-1, egid));
+	if (!p_setregid (-1, egid)) {
+		return egid;
+	}
+
+	return EACCDN;
 }
 
 /*  tesche: audit user id functions, these id's never change once set to != 0