Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Steve Lhomme
VLC
Commits
1ec4edf0
Commit
1ec4edf0
authored
Jan 24, 2016
by
Thomas Guillem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsm: don't store domain when it doesn't come from the user
parent
e39d63e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
modules/access/dsm/access.c
modules/access/dsm/access.c
+7
-4
No files found.
modules/access/dsm/access.c
View file @
1ec4edf0
...
...
@@ -323,7 +323,7 @@ static int login( access_t *p_access )
vlc_UrlParse
(
&
url
,
p_access
->
psz_url
);
vlc_credential_init
(
&
credential
,
&
url
);
psz_var_domain
=
var_InheritString
(
p_access
,
"smb-domain"
);
credential
.
psz_realm
=
psz_var_domain
?
psz_var_domain
:
p_sys
->
netbios_name
;
credential
.
psz_realm
=
psz_var_domain
?
psz_var_domain
:
NULL
;
vlc_credential_get
(
&
credential
,
p_access
,
"smb-user"
,
"smb-pwd"
,
NULL
,
NULL
);
...
...
@@ -339,7 +339,7 @@ static int login( access_t *p_access )
psz_login
=
credential
.
psz_username
;
psz_password
=
credential
.
psz_password
;
}
psz_domain
=
credential
.
psz_realm
;
psz_domain
=
credential
.
psz_realm
?
credential
.
psz_realm
:
p_sys
->
netbios_name
;
/* Try to authenticate on the remote machine */
if
(
smb_connect
(
p_access
,
psz_login
,
psz_password
,
psz_domain
)
...
...
@@ -352,7 +352,8 @@ static int login( access_t *p_access )
b_guest
=
false
;
psz_login
=
credential
.
psz_username
;
psz_password
=
credential
.
psz_password
;
psz_domain
=
credential
.
psz_realm
;
psz_domain
=
credential
.
psz_realm
?
credential
.
psz_realm
:
p_sys
->
netbios_name
;
if
(
smb_connect
(
p_access
,
psz_login
,
psz_password
,
psz_domain
)
==
VLC_SUCCESS
)
goto
success
;
...
...
@@ -375,7 +376,9 @@ success:
{
if
(
asprintf
(
&
p_sys
->
psz_user_opt
,
"smb-user=%s"
,
psz_login
)
==
-
1
)
p_sys
->
psz_user_opt
=
NULL
;
if
(
asprintf
(
&
p_sys
->
psz_domain_opt
,
"smb-domain=%s"
,
psz_domain
)
==
-
1
)
if
(
credential
.
psz_realm
!=
NULL
&&
asprintf
(
&
p_sys
->
psz_domain_opt
,
"smb-domain=%s"
,
credential
.
psz_realm
)
==
-
1
)
p_sys
->
psz_domain_opt
=
NULL
;
if
(
!
vlc_credential_store
(
&
credential
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment