mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
got rid of bogus write list substitution error messages
(This used to be commit 0deae6c407
)
This commit is contained in:
parent
af0d86a9fc
commit
56aa0a274d
@ -259,27 +259,30 @@ static NTSTATUS share_sanity_checks(int snum, char* service, char *dev)
|
||||
****************************************************************************/
|
||||
static void set_read_only(connection_struct *conn)
|
||||
{
|
||||
char **list;
|
||||
char *service = lp_servicename(conn->service);
|
||||
conn->read_only = lp_readonly(conn->service);
|
||||
|
||||
{
|
||||
char **list;
|
||||
if (!service) return;
|
||||
|
||||
lp_list_copy(&list, lp_readlist(conn->service));
|
||||
if(list && lp_list_substitute(list, "%S", service)) {
|
||||
if (user_in_list(conn->user, list))
|
||||
conn->read_only = True;
|
||||
lp_list_copy(&list, lp_readlist(conn->service));
|
||||
if (list) {
|
||||
if (!lp_list_substitute(list, "%S", service)) {
|
||||
DEBUG(0, ("ERROR: read list substitution failed\n"));
|
||||
}
|
||||
else DEBUG(0, ("ERROR: read list substitution failed\n"));
|
||||
if (list) lp_list_free(&list);
|
||||
|
||||
lp_list_copy(&list, lp_writelist(conn->service));
|
||||
if(list && lp_list_substitute(list, "%S", service)) {
|
||||
if (user_in_list(conn->user, list))
|
||||
conn->read_only = False;
|
||||
if (user_in_list(conn->user, list))
|
||||
conn->read_only = True;
|
||||
lp_list_free(&list);
|
||||
}
|
||||
|
||||
lp_list_copy(&list, lp_writelist(conn->service));
|
||||
if (list) {
|
||||
if (!lp_list_substitute(list, "%S", service)) {
|
||||
DEBUG(0, ("ERROR: write list substitution failed\n"));
|
||||
}
|
||||
else DEBUG(0, ("ERROR: write list substitution failed\n"));
|
||||
if (list) lp_list_free(&list);
|
||||
if (user_in_list(conn->user, list))
|
||||
conn->read_only = False;
|
||||
lp_list_free(&list);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user