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
GSoC
GSoC2018
macOS
vlc
Commits
68f4193c
Commit
68f4193c
authored
Feb 17, 2016
by
Thomas Guillem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsm: don't store credentials in sub items options
parent
8ab80c83
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
31 deletions
+1
-31
modules/access/dsm/access.c
modules/access/dsm/access.c
+1
-31
No files found.
modules/access/dsm/access.c
View file @
68f4193c
...
...
@@ -106,9 +106,6 @@ struct access_sys_t
vlc_url_t
url
;
char
*
psz_share
;
char
*
psz_path
;
char
*
psz_user_opt
;
char
*
psz_pwd_opt
;
char
*
psz_domain_opt
;
char
netbios_name
[
16
];
struct
in_addr
addr
;
...
...
@@ -218,9 +215,6 @@ static void Close( vlc_object_t *p_this )
smb_share_list_destroy
(
p_sys
->
shares
);
if
(
p_sys
->
files
)
smb_stat_list_destroy
(
p_sys
->
files
);
free
(
p_sys
->
psz_user_opt
);
free
(
p_sys
->
psz_pwd_opt
);
free
(
p_sys
->
psz_domain_opt
);
free
(
p_sys
->
psz_share
);
free
(
p_sys
->
psz_path
);
free
(
p_sys
);
...
...
@@ -376,18 +370,7 @@ success:
msg_Warn
(
p_access
,
"Creds: username = '%s', domain = '%s'"
,
psz_login
,
psz_domain
);
if
(
!
b_guest
)
{
if
(
asprintf
(
&
p_sys
->
psz_user_opt
,
"smb-user=%s"
,
psz_login
)
==
-
1
)
p_sys
->
psz_user_opt
=
NULL
;
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
,
p_access
)
&&
asprintf
(
&
p_sys
->
psz_pwd_opt
,
"smb-pwd=%s"
,
psz_password
)
==
-
1
)
p_sys
->
psz_pwd_opt
=
NULL
;
}
vlc_credential_store
(
&
credential
,
p_access
);
i_ret
=
VLC_SUCCESS
;
error:
...
...
@@ -542,7 +525,6 @@ static int Control( access_t *p_access, int i_query, va_list args )
static
input_item_t
*
new_item
(
access_t
*
p_access
,
const
char
*
psz_name
,
int
i_type
)
{
access_sys_t
*
p_sys
=
p_access
->
p_sys
;
input_item_t
*
p_item
;
char
*
psz_uri
;
int
i_ret
;
...
...
@@ -565,18 +547,6 @@ static input_item_t *new_item( access_t *p_access, const char *psz_name,
if
(
p_item
==
NULL
)
return
NULL
;
/* Here we save on the node the credentials that allowed us to login.
* That way the user isn't prompted more than once for credentials */
if
(
p_sys
->
psz_user_opt
!=
NULL
)
input_item_AddOption
(
p_item
,
p_sys
->
psz_user_opt
,
VLC_INPUT_OPTION_TRUSTED
);
if
(
p_sys
->
psz_pwd_opt
!=
NULL
)
input_item_AddOption
(
p_item
,
p_sys
->
psz_pwd_opt
,
VLC_INPUT_OPTION_TRUSTED
);
if
(
p_sys
->
psz_domain_opt
!=
NULL
)
input_item_AddOption
(
p_item
,
p_sys
->
psz_domain_opt
,
VLC_INPUT_OPTION_TRUSTED
);
return
p_item
;
}
...
...
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