home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / unix / bsd / 10483 < prev    next >
Encoding:
Text File  |  1992-12-21  |  1.5 KB  |  46 lines

  1. Newsgroups: comp.unix.bsd
  2. Path: sparky!uunet!caen!batcomputer!ghost.dsi.unimi.it!serini
  3. From: serini@ghost.dsi.unimi.it (Piero Serini)
  4. Subject: setgroups() - bug ?
  5. Organization: Computer Science Dep. - Milan University
  6. Date: Sun, 20 Dec 1992 23:08:59 GMT
  7. Message-ID: <1992Dec20.230859.11383@ghost.dsi.unimi.it>
  8. Lines: 36
  9.  
  10. HI all.
  11.  
  12. I suspect there's a bug in setgrupos() call :
  13.  
  14. from /etc/passwd: foo::1000:1000: ...
  15. from /etc/group:  foo:*:1000:
  16.  
  17. Now, user foo is of group foo and no other groups.
  18. If foo does an 'id' he gets:
  19. uid=1000(foo) gid=1000(foo) groups=1000(foo)
  20.  
  21. The question is: if a user belongs to one group only,
  22. is it correct that id shows a 'groups' entry, or should
  23. it be better to omit this ?
  24. I personally think that a 'normal' id, that is with just
  25. one group, should show no 'groups' entry, as it's obvious
  26. I belong to groups foo if my gid is foo ...
  27. In fact, if foo belongs to groups 'foo2' too, the id would
  28. show:
  29. uid=1000(foo) gid=1000(foo) groups=1000(foo), 1001(foo2)
  30.  
  31. while I think better:
  32. uid=1000(foo) gid=1000(foo) groups=1001(foo2)
  33.  
  34. This is the way other Unixes act, say HP-UX for example.
  35.  
  36. Let me know what you think
  37. Bye
  38. Piero
  39.  
  40. ------------------------------------------ Piero Serini -----------------
  41. Piero Serini                      E-mail: serini@ghost.dsi.unimi.it   
  42. Computer Science Dept.            or: piero@strider.st.dsi.unimi.it
  43. Univ. Statale - Milano - ITALY      ** mail me your .signature **
  44. -------------------------------------------------------------------------
  45.  
  46.