From: Michael Meffie Date: Tue, 30 Apr 2013 15:30:15 +0000 (-0400) Subject: pt_util: fix group line check for input files X-Git-Tag: upstream/1.6.10_pre1^2~166 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=7863332ab7a88dd1aaa3c5bd2138622c57ee6197;p=packages%2Fo%2Fopenafs.git pt_util: fix group line check for input files Fix the check for requiring group lines before any membership lines. Do not clear flag indicating the presence of a group after reading each line. (This error was caught by the pt_util-t unit test.) Fix for commit 12ced70c95fe8efbcec09a372f0af81d819bb8cd Reviewed-on: http://gerrit.openafs.org/9832 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 9c391e7f7d0e5dfdfe947d385e2db9a8b8ca3610) Change-Id: I6414f78d7611c61628aaacb4ae41111dbeec0d89 Reviewed-on: http://gerrit.openafs.org/11148 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand --- diff --git a/src/ptserver/pt_util.c b/src/ptserver/pt_util.c index 213e5b1dd..b1c6fe41a 100644 --- a/src/ptserver/pt_util.c +++ b/src/ptserver/pt_util.c @@ -243,10 +243,10 @@ CommandProc(struct cmd_syndesc *a_as, void *arock) if (wflag) { struct usr_list *u; int id = 0, flags = 0; + int seenGroup = 0; while (fgets(buffer, sizeof(buffer), dfp)) { int oid, cid, quota, uid; - int seenGroup = 0; char name[PR_MAXNAMELEN], mem[PR_MAXNAMELEN]; if (isspace(*buffer)) {