svn commit: samba r9380 - in branches/SOC/SAMBA_3_0/source/client: .
kalim at samba.org
kalim at samba.org
Thu Aug 18 06:50:59 GMT 2005
Author: kalim
Date: 2005-08-18 06:50:58 +0000 (Thu, 18 Aug 2005)
New Revision: 9380
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=9380
Log:
Added handling to the authentication callback for passwords specified on the command line and the -N|--no-pass option.
Cleaned up straggling debug output.
-Kalim
Modified:
branches/SOC/SAMBA_3_0/source/client/client.c
Changeset:
Modified: branches/SOC/SAMBA_3_0/source/client/client.c
===================================================================
--- branches/SOC/SAMBA_3_0/source/client/client.c 2005-08-18 06:19:32 UTC (rev 9379)
+++ branches/SOC/SAMBA_3_0/source/client/client.c 2005-08-18 06:50:58 UTC (rev 9380)
@@ -140,18 +140,26 @@
strncpy(pUsername, username, maxLenUsername - 1);
strncpy(authUsername, username, maxLenUsername - 1);
- char *pass = getpass("Password: ");
- if (pass)
- fstrcpy(temp, pass);
- if (temp[strlen(temp) - 1] == '\n') /* A new line? */
+ if (cmdline_auth_info.got_pass)
{
- temp[strlen(temp) - 1] = '\0';
- }
- if (temp[0] != '\0')
+ strncpy(pPassword, cmdline_auth_info.password, maxLenPassword - 1);
+ strncpy(authPassword, cmdline_auth_info.password, maxLenPassword - 1);
+ }
+ else
{
- strncpy(pPassword, temp, maxLenPassword - 1);
- strncpy(authPassword, pPassword, maxLenPassword - 1);
- }
+ char *pass = getpass("Password: ");
+ if (pass)
+ fstrcpy(temp, pass);
+ if (temp[strlen(temp) - 1] == '\n') /* A new line? */
+ {
+ temp[strlen(temp) - 1] = '\0';
+ }
+ if (temp[0] != '\0')
+ {
+ strncpy(pPassword, temp, maxLenPassword - 1);
+ strncpy(authPassword, pPassword, maxLenPassword - 1);
+ }
+ }
authSet = 1;
}
}
@@ -2376,7 +2384,7 @@
pstrcat(src, oname);
pstrcat(dest, nname);
- d_printf("O: %s\nN: %s\n", src, dest);
+ DEBUG(4, ("O: %s\nN: %s\n", src, dest));
err = smbc_rename(src, dest);
if (err < 0)
More information about the samba-cvs
mailing list