From 645d68a45ab2ca132485e1cf2ae42b04074a8f01 Mon Sep 17 00:00:00 2001 From: Martin Pool Date: Mon, 17 Feb 2003 06:28:58 +0000 Subject: Don't pstrcpy into an fstring. (Harmless in this case since it comes from an environment variable.) (This used to be commit 9f9077346bf9f7c96376169c60aa893f15fb9d2c) --- source3/rpcclient/rpcclient.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'source3') 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; -- cgit