The Samba-Bugzilla – Attachment 3378 Details for
Bug 5580
Unable to access DFS shares using libsmbclient
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed patch
libsmbclient.patch.txt (text/plain), 1.37 KB, created by
Brian Sheehan
on 2008-07-02 17:49:55 UTC
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
Brian Sheehan
Created:
2008-07-02 17:49:55 UTC
Size:
1.37 KB
patch
obsolete
>--- samba-3.0.30/source/libsmb/libsmbclient.old.c 2008-07-02 15:28:14.063431000 -0700 >+++ samba-3.0.30/source/libsmb/libsmbclient.c 2008-07-02 15:21:36.633486000 -0700 >@@ -6665,6 +6665,18 @@ > return context; > } > >+/* Set the credentials so DFS will work when following referrals.*/ >+void >+smbc_set_credentials(char *workgroup, char *user, char *password) >+{ >+ struct user_auth_info auth_info; >+ >+ pstrcpy(auth_info.username, user); >+ pstrcpy(auth_info.password, password); >+ auth_info.got_pass = True; >+ cli_cm_set_credentials(&auth_info); >+ set_global_myworkgroup(workgroup); >+} > > /* Return the verion of samba, and thus libsmbclient */ > const char * >--- samba-3.0.30/source/include/libsmbclient.old.h 2008-07-02 15:27:57.054330000 -0700 >+++ samba-3.0.30/source/include/libsmbclient.h 2008-07-02 15:23:03.823855000 -0700 >@@ -733,6 +733,20 @@ > > SMBCCTX * smbc_set_context(SMBCCTX * new_context); > >+/**@ingroup misc >+ * Set the users credentials globally so they can be used for DFS >+ * referrals. Probably best to use this function in the smbc_get_auth_data_fn >+ * callback. >+ * >+ * @param workgroup Workgroup of the user. >+ * >+ * @param user Username of user. >+ * >+ * @param password Password of user. >+ */ >+ >+void smbc_set_credentials(char *workgroup, char *user, char *password); >+ > /**@ingroup file > * Open a file on an SMB server. > *
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 5580
:
3378
|
3489