Hi,
When applying the pdbtool import function
to a stock Unix group file, things will break
because standard gids are (to my knowledge) positive.
We have a local patch that'll make sure coda groups
have a negative id. We also fixed the parsing with fscanf,
though it still has problems, e.g. if a Unix group has no members.
Is there any use for our patch ?
Or did we break something else ?
So long,
Steffen
-----------------------------
sneumann@aipc10:/coda/homes/sneumann/coda/src/coda-5.3.10/coda-src/al > rcsdiff
-r1.1 pdbtool.c
===================================================================
RCS file: RCS/pdbtool.c,v
retrieving revision 1.1
diff -r1.1 pdbtool.c
607c607,609
< rc = fscanf(userfile, "%[^:]:%*[^:]:%d:%*s\n", user, &user_id);
---
> /* %s SEEMS BUGGY ! STN */
> /* rc = fscanf(userfile, "%[^:]:%*[^:]:%d:%*s\n", user, &user_id); */
> rc = fscanf(userfile, "%[^:]:%*[^:]:%d:%[^\n]\n", user, &user_id);
628c630
< rc = fscanf(groupfile, "%[^:]:%*[^:]:%d:%s\n",
---
> rc = fscanf(groupfile, "%[^:]:%*[^:]:%d:%[^\n]\n",
631a634,636
> /* ensure negative group ids from Unix group file */
> group_id = -1 * abs ( group_id ) ;
>
656c661
< rc = fscanf(groupfile, "%[^:]:%*[^:]:%d:%s\n",
---
> rc = fscanf(groupfile, "%[^:]:%*[^:]:%d:%[^\n]\n",
658a664,666
>
> /* ensure negative group ids from Unix group file */
> group_id = -1 * abs ( group_id ) ;