svn commit: samba r21005 - in branches: SAMBA_3_0/source/lib SAMBA_3_0_24/source/lib

vlendec at samba.org vlendec at samba.org
Wed Jan 24 16:15:30 GMT 2007


Author: vlendec
Date: 2007-01-24 16:15:29 +0000 (Wed, 24 Jan 2007)
New Revision: 21005

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21005

Log:
Add a debug message for EAGAIN error of setresuid.

Volker

Modified:
   branches/SAMBA_3_0/source/lib/util_sec.c
   branches/SAMBA_3_0_24/source/lib/util_sec.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/util_sec.c
===================================================================
--- branches/SAMBA_3_0/source/lib/util_sec.c	2007-01-24 15:29:58 UTC (rev 21004)
+++ branches/SAMBA_3_0/source/lib/util_sec.c	2007-01-24 16:15:29 UTC (rev 21005)
@@ -198,7 +198,13 @@
 {
 #if USE_SETRESUID
         /* Set the effective as well as the real uid. */
-	setresuid(uid,uid,-1);
+	if (setresuid(uid,uid,-1) == -1) {
+		if (errno == EAGAIN) {
+			DEBUG(0, ("setresuid failed with EAGAIN. uid(%d) "
+				  "might be over its NPROC limit\n",
+				  (int)uid));
+		}
+	}
 #endif
 
 #if USE_SETREUID

Modified: branches/SAMBA_3_0_24/source/lib/util_sec.c
===================================================================
--- branches/SAMBA_3_0_24/source/lib/util_sec.c	2007-01-24 15:29:58 UTC (rev 21004)
+++ branches/SAMBA_3_0_24/source/lib/util_sec.c	2007-01-24 16:15:29 UTC (rev 21005)
@@ -198,7 +198,13 @@
 {
 #if USE_SETRESUID
         /* Set the effective as well as the real uid. */
-	setresuid(uid,uid,-1);
+	if (setresuid(uid,uid,-1) == -1) {
+		if (errno == EAGAIN) {
+			DEBUG(0, ("setresuid failed with EAGAIN. uid(%d) "
+				  "might be over its NPROC limit\n",
+				  (int)uid));
+		}
+	}
 #endif
 
 #if USE_SETREUID



More information about the samba-cvs mailing list