diff options
author | Martin Pool <mbp@samba.org> | 2003-02-17 06:28:58 +0000 |
---|---|---|
committer | Martin Pool <mbp@samba.org> | 2003-02-17 06:28:58 +0000 |
commit | 645d68a45ab2ca132485e1cf2ae42b04074a8f01 (patch) | |
tree | fddd2b09aa4d5a7ae94d1b93b8fb9eef619df067 /source3/rpcclient | |
parent | 541ed81a630aeae97a178e9099b0a920f9b3f84f (diff) | |
download | samba-645d68a45ab2ca132485e1cf2ae42b04074a8f01.tar.gz samba-645d68a45ab2ca132485e1cf2ae42b04074a8f01.tar.bz2 samba-645d68a45ab2ca132485e1cf2ae42b04074a8f01.zip |
Don't pstrcpy into an fstring. (Harmless in this case since it comes
from an environment variable.)
(This used to be commit 9f9077346bf9f7c96376169c60aa893f15fb9d2c)
Diffstat (limited to 'source3/rpcclient')
-rw-r--r-- | source3/rpcclient/rpcclient.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c index f38ef64eb2..81bb62486a 100644 --- a/source3/rpcclient/rpcclient.c +++ b/source3/rpcclient/rpcclient.c @@ -175,16 +175,23 @@ static char* next_command (char** cmdstr) return command; } + +/** + * Find default username from environment variables. + * + * @param username fstring to receive username; not touched if none is + * known. + **/ static void get_username (char *username) { if (getenv("USER")) - pstrcpy(username,getenv("USER")); + fstrcpy(username,getenv("USER")); if (*username == 0 && getenv("LOGNAME")) - pstrcpy(username,getenv("LOGNAME")); + fstrcpy(username,getenv("LOGNAME")); if (*username == 0) { - pstrcpy(username,"GUEST"); + fstrcpy(username,"GUEST"); } return; |