SOURCES: util-vserver-rpm-fake-resolver-badperm-errorlogging.patch...
glen
glen at pld-linux.org
Fri Jun 16 09:03:47 CEST 2006
Author: glen Date: Fri Jun 16 07:03:47 2006 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- use errno check as it's more reliable
---- Files affected:
SOURCES:
util-vserver-rpm-fake-resolver-badperm-errorlogging.patch (1.1 -> 1.2)
---- Diffs:
================================================================
Index: SOURCES/util-vserver-rpm-fake-resolver-badperm-errorlogging.patch
diff -u SOURCES/util-vserver-rpm-fake-resolver-badperm-errorlogging.patch:1.1 SOURCES/util-vserver-rpm-fake-resolver-badperm-errorlogging.patch:1.2
--- SOURCES/util-vserver-rpm-fake-resolver-badperm-errorlogging.patch:1.1 Fri Jun 16 02:28:27 2006
+++ SOURCES/util-vserver-rpm-fake-resolver-badperm-errorlogging.patch Fri Jun 16 09:03:41 2006
@@ -17,11 +17,12 @@
--- 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,12 @@
+@@ -161,6 +161,13 @@
if (EreadAll(0, buf, len)) {
buf[len] = '\0';
++ errno = 0;
res = getpwnam(buf);
-+ if (!res) {
++ if (errno) {
+ WRITE_MSG(2, ENSC_WRAPPERS_PREFIX "getpwnam(): ");
+ WRITE_STR(2, strerror(errno));
+ WRITE_MSG(2, "\n");
@@ -30,11 +31,12 @@
}
if (res!=0) sendResult(true, res->pw_uid);
-@@ -182,6 +188,12 @@
+@@ -182,6 +189,13 @@
if (EreadAll(0, buf, len)) {
buf[len] = '\0';
++ errno = 0;
res = getgrnam(buf);
-+ if (!res) {
++ if (errno) {
+ WRITE_MSG(2, ENSC_WRAPPERS_PREFIX "getgrnam(): ");
+ WRITE_STR(2, strerror(errno));
+ WRITE_MSG(2, "\n");
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SOURCES/util-vserver-rpm-fake-resolver-badperm-errorlogging.patch?r1=1.1&r2=1.2&f=u
More information about the pld-cvs-commit
mailing list