Describe the semantics of the sgetpwnam() helper function
in the comment above it so that nobody will save pointers returned inside "struct passwd" across the calls to the function.
This commit is contained in:
parent
cf181f3b71
commit
c29b9b4797
@ -934,6 +934,9 @@ sgetsave(char *s)
|
||||
* Save the result of a getpwnam. Used for USER command, since
|
||||
* the data returned must not be clobbered by any other command
|
||||
* (e.g., globbing).
|
||||
* NB: The data returned by sgetpwnam() will remain valid until
|
||||
* the next call to this function. Its difference from getpwnam()
|
||||
* is that sgetpwnam() is known to be called from ftpd code only.
|
||||
*/
|
||||
static struct passwd *
|
||||
sgetpwnam(char *name)
|
||||
|
Loading…
x
Reference in New Issue
Block a user