SOURCES: util-vserver-rpm-fake-resolver-badperm-errorlogging.patch...

glen glen at pld-linux.org
Sat Jun 17 22:22:06 CEST 2006


Author: glen                         Date: Sat Jun 17 20:22:06 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- just warn, as get{pw,gr}nam will fail with similiar error at vserver creation (root dir not present yet

---- Files affected:
SOURCES:
   util-vserver-rpm-fake-resolver-badperm-errorlogging.patch (1.2 -> 1.3) 

---- Diffs:

================================================================
Index: SOURCES/util-vserver-rpm-fake-resolver-badperm-errorlogging.patch
diff -u SOURCES/util-vserver-rpm-fake-resolver-badperm-errorlogging.patch:1.2 SOURCES/util-vserver-rpm-fake-resolver-badperm-errorlogging.patch:1.3
--- SOURCES/util-vserver-rpm-fake-resolver-badperm-errorlogging.patch:1.2	Fri Jun 16 09:03:41 2006
+++ SOURCES/util-vserver-rpm-fake-resolver-badperm-errorlogging.patch	Sat Jun 17 22:22:01 2006
@@ -17,31 +17,20 @@
 
 --- util-vserver-0.30.210/src/rpm-fake-resolver.c~	2006-06-16 03:22:36.000000000 +0300
 +++ util-vserver-0.30.210/src/rpm-fake-resolver.c	2006-06-16 03:22:40.000000000 +0300
-@@ -161,6 +161,13 @@
-     if (EreadAll(0, buf, len)) {
-       buf[len] = '\0';
-+      errno = 0;
-       res = getpwnam(buf);
-+      if (errno) {
-+        WRITE_MSG(2, ENSC_WRAPPERS_PREFIX "getpwnam(): ");
-+        WRITE_STR(2, strerror(errno));
-+        WRITE_MSG(2, "\n");
-+        exit(1);
-+      }
-     }
-     
-     if (res!=0) sendResult(true,  res->pw_uid);
-@@ -182,6 +189,13 @@
-     if (EreadAll(0, buf, len)) {
-       buf[len] = '\0';
-+      errno = 0;
-       res = getgrnam(buf);
-+      if (errno) {
-+        WRITE_MSG(2, ENSC_WRAPPERS_PREFIX "getgrnam(): ");
-+        WRITE_STR(2, strerror(errno));
-+        WRITE_MSG(2, "\n");
-+        exit(1);
-+      }
-     }
-     
-     if (res!=0) sendResult(true,  res->gr_gid);
+@@ -301,10 +301,16 @@
+   Echdir("/");
+ 
+   activateContext(args.ctx, args.in_ctx, args.caps, args.flags);
+   Esetgroups(0, &args.gid);
+   Esetgid(args.gid);
+   Esetuid(args.uid);
+ 
++  if (access("/", X_OK) == -1) {
++    WRITE_MSG(2,
++    "***  root directory is not accessible for specified uid. rpm-fake-resolver will most likely fail.\n"
++    );
++  }
++
+   if (args.do_fork) daemonize(&args, pid_fd);
+   if (pid_fd!=-1)   close(pid_fd);
+   run();
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/util-vserver-rpm-fake-resolver-badperm-errorlogging.patch?r1=1.2&r2=1.3&f=u



More information about the pld-cvs-commit mailing list