home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / aix / 8210 < prev    next >
Encoding:
Text File  |  1992-07-27  |  1.6 KB  |  38 lines

  1. Newsgroups: comp.unix.aix
  2. Path: sparky!uunet!gatech!bloom-beacon!bloom-picayune.mit.edu!athena.mit.edu!lwvanels
  3. From: lwvanels@athena.mit.edu (Lucien W. Van Elsen)
  4. Subject: Re: problem with putuserpw subroutine
  5. In-Reply-To: bware@slate.mines.colorado.edu's message of 23 Jul 92 22:57:34 GMT
  6. Message-ID: <LWVANELS.92Jul27094958@fionavar.mit.edu>
  7. Sender: news@athena.mit.edu (News system)
  8. Nntp-Posting-Host: fionavar.mit.edu
  9. Reply-To: lwvanels@MIT.EDU
  10. Organization: Massachusetts Institute of Technology
  11. References: <1992Jul23.225734.9999@slate.mines.colorado.edu>
  12. Date: Mon, 27 Jul 1992 13:50:16 GMT
  13. Lines: 23
  14.  
  15. bware@slate.mines.colorado.edu (Bob Ware) writes:
  16.  
  17. >   Has anyone had success using the putuserpw subroutine?  
  18. >   The getuserpw subroutine seems to work as advertised, but the putuserpw
  19. >   routine always bombs with errno pointing to:
  20. >       Only the owner or a privileged user can perform the operation.
  21.  
  22. It looks like there is indeed a bug; it looks like getuserpw() is doing a
  23. setpwdb() to get read-only access to the auth db, and never closing it when
  24. it is finished.  Furthermore, it looks like putuserpw is trying to be smart
  25. about things, and not trying to get read-write access if the database is
  26. open at all.  Since getuserpw left it open with read-only access, putuserpw
  27. fails.
  28.  
  29. There's two work-arounds for this- either explicitly call
  30. setpwdb(S_READ|S_WRITE) before putuserpw(), or call endpwdb() after the call
  31. to getuserpw.
  32.  
  33.         -Lucien
  34.  
  35. ----------------------------------------------------------------------------
  36. Lucien Van Elsen               | lwvanels@athena.mit.edu
  37. MIT Athena Systems Development |
  38.