[Pvfs2-cvs] commit by nlmills in pvfs2/src/common/misc: server-config.c

CVS commit program cvs at parl.clemson.edu
Fri Dec 5 12:01:36 EST 2008


Update of /anoncvs/pvfs2/src/common/misc
In directory parlweb1:/tmp/cvs-serv15441/src/common/misc

Modified Files:
      Tag: cu-security-branch
	server-config.c 
Log Message:
fixed bugs in security mapping parser


Index: server-config.c
===================================================================
RCS file: /anoncvs/pvfs2/src/common/misc/server-config.c,v
diff -p -u -r1.106.8.8 -r1.106.8.9
--- server-config.c	30 Nov 2008 23:47:19 -0000	1.106.8.8
+++ server-config.c	5 Dec 2008 17:01:36 -0000	1.106.8.9
@@ -2772,6 +2772,7 @@ DOTCONF_CB(get_security_mapping)
         return strerror(errno);
     }
     strncpy(mapping->account, line + account, i - account);
+    mapping->account[i-account] = '\0';
     
     for (keyword = i; (keyword < len) && isspace(line[keyword]); keyword++);
     for (i = keyword+1; (i < len) && !isspace(line[i]); i++);
@@ -2831,6 +2832,7 @@ DOTCONF_CB(get_security_mapping)
         return strerror(errno);
     }
     strncpy(mapping->pattern, line + pattern, i - pattern);
+    mapping->pattern[i-pattern] = '\0';
     
     if (!config_s->security_mappings)
     {



More information about the Pvfs2-cvs mailing list