diff options
author | yar <yar@FreeBSD.org> | 2004-10-30 16:11:15 +0000 |
---|---|---|
committer | yar <yar@FreeBSD.org> | 2004-10-30 16:11:15 +0000 |
commit | 4e42ff84eb6d2ed05e941dc657801d69e9b440f7 (patch) | |
tree | 25d4611fbb7fa4696030663a69e78222ed4273f7 /libexec/ftpd | |
parent | 33771cab2b2109dc3916627d71b17d9706bb5ca6 (diff) | |
download | FreeBSD-src-4e42ff84eb6d2ed05e941dc657801d69e9b440f7.zip FreeBSD-src-4e42ff84eb6d2ed05e941dc657801d69e9b440f7.tar.gz |
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.
Diffstat (limited to 'libexec/ftpd')
-rw-r--r-- | libexec/ftpd/ftpd.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index 10e4387..fdcb76e 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -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) |