The Samba-Bugzilla – Attachment 4398 Details for
Bug 6524
Put smb-name in front of the local user when smbpasswd
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
The updated diff for util/smbpasswd.c
smbpasswd.diff (text/plain), 1.10 KB, created by
Zhou Weikuan
on 2009-07-07 02:16:29 UTC
(
hide
)
Description:
The updated diff for util/smbpasswd.c
Filename:
MIME Type:
Creator:
Zhou Weikuan
Created:
2009-07-07 02:16:29 UTC
Size:
1.10 KB
patch
obsolete
>diff --git a/source3/utils/smbpasswd.c b/source3/utils/smbpasswd.c >index 7957dd8..cde6feb 100644 >--- a/source3/utils/smbpasswd.c >+++ b/source3/utils/smbpasswd.c >@@ -498,6 +498,7 @@ static int process_nonroot(int local_flags) > int result = 0; > char *old_pw = NULL; > char *new_pw = NULL; >+ fstring real_name; > > if (local_flags & ~(LOCAL_AM_ROOT | LOCAL_SET_PASSWORD)) { > /* Extra flags that we can't honor non-root */ >@@ -525,6 +526,15 @@ static int process_nonroot(int local_flags) > > if (remote_machine == NULL) { > remote_machine = "127.0.0.1"; >+ if (strchr(real_name, '\\') == NULL) { >+ fstrcpy(real_name, global_myname()); >+ fstrcat(real_name, "\\"); >+ fstrcat(real_name, user_name); >+ } else { >+ fstrcpy(real_name, user_name); >+ } >+ } else { >+ fstrcpy(real_name, user_name); > } > > if (remote_machine != NULL) { >@@ -542,7 +552,7 @@ static int process_nonroot(int local_flags) > exit(1); > } > >- if (!NT_STATUS_IS_OK(password_change(remote_machine, user_name, old_pw, >+ if (!NT_STATUS_IS_OK(password_change(remote_machine, real_name, old_pw, > new_pw, 0))) { > result = 1; > goto done;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 6524
:
4380
| 4398