Don't pstrcpy into an fstring. (Harmless in this case since it comes
authorMartin Pool <mbp@samba.org>
Mon, 17 Feb 2003 06:28:58 +0000 (06:28 +0000)
committerMartin Pool <mbp@samba.org>
Mon, 17 Feb 2003 06:28:58 +0000 (06:28 +0000)
from an environment variable.)

source/rpcclient/rpcclient.c

index f38ef64eb2aa24904cb878d987c21f9be8e741f8..81bb62486a17d8098334cac9ace6799a9302deb8 100644 (file)
@@ -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;