SOURCES: pam-succif-in-operator.patch (NEW) - fix 'in' operator in...
baggins
baggins at pld-linux.org
Sat Oct 27 17:17:31 CEST 2007
Author: baggins Date: Sat Oct 27 15:17:31 2007 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- fix 'in' operator in pam_succeed_if module
---- Files affected:
SOURCES:
pam-succif-in-operator.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/pam-succif-in-operator.patch
diff -u /dev/null SOURCES/pam-succif-in-operator.patch:1.1
--- /dev/null Sat Oct 27 17:17:31 2007
+++ SOURCES/pam-succif-in-operator.patch Sat Oct 27 17:17:26 2007
@@ -0,0 +1,34 @@
+pam_succeed_if: fix in operator (#295151)
+
+Written-by: Tomas Mraz <tmraz at redhat.com>
+Reviewed-by: Karel Zak <kzak at redhat.com>
+
+diff -up Linux-PAM-0.99.8.1/modules/pam_succeed_if/pam_succeed_if.c.in-operator Linux-PAM-0.99.8.1/modules/pam_succeed_if/pam_succeed_if.c
+--- Linux-PAM-0.99.8.1/modules/pam_succeed_if/pam_succeed_if.c.in-operator 2006-08-31 12:20:39.000000000 +0200
++++ Linux-PAM-0.99.8.1/modules/pam_succeed_if/pam_succeed_if.c 2007-09-19 19:36:22.000000000 +0200
+@@ -191,13 +191,19 @@ static int
+ evaluate_inlist(const char *left, const char *right)
+ {
+ char *p;
+- if ((p=strstr(right, left)) == NULL)
+- return PAM_AUTH_ERR;
+- if (p == right || *(p-1) == ':') { /* ':' is a list separator */
+- p += strlen(left);
+- if (*p == '\0' || *p == ':') {
+- return PAM_SUCCESS;
++ /* Don't care about left containing ':'. */
++ while ((p=strstr(right, left)) != NULL) {
++ if (p == right || *(p-1) == ':') { /* ':' is a list separator */
++ p += strlen(left);
++ if (*p == '\0' || *p == ':') {
++ return PAM_SUCCESS;
++ }
+ }
++ right = strchr(p, ':');
++ if (right == NULL)
++ break;
++ else
++ ++right;
+ }
+ return PAM_AUTH_ERR;
+ }
================================================================
More information about the pld-cvs-commit
mailing list