mirror of
https://github.com/samba-team/samba.git
synced 2024-12-27 03:21:53 +03:00
r6706: * fix bug that prevented smbclient from creating directories
on non-dfs paths * add patch from James Peach to remove use of uninitialized variables
This commit is contained in:
parent
874353e617
commit
c71f20f1ae
@ -464,7 +464,7 @@ BOOL cli_dfs_make_full_path( pstring path, const char *server, const char *share
|
||||
check for dfs referral
|
||||
********************************************************************/
|
||||
|
||||
static BOOL cli_dfs_check_error( struct cli_state *cli )
|
||||
static BOOL cli_dfs_check_error( struct cli_state *cli, NTSTATUS status )
|
||||
{
|
||||
uint32 flgs2 = SVAL(cli->inbuf,smb_flg2);
|
||||
|
||||
@ -473,7 +473,7 @@ static BOOL cli_dfs_check_error( struct cli_state *cli )
|
||||
if ( !( (flgs2&FLAGS2_32_BIT_ERROR_CODES) && (flgs2&FLAGS2_UNICODE_STRINGS) ) )
|
||||
return False;
|
||||
|
||||
if ( NT_STATUS_EQUAL( NT_STATUS_PATH_NOT_COVERED, NT_STATUS(IVAL(cli->inbuf,smb_rcls)) ) )
|
||||
if ( NT_STATUS_EQUAL( status, NT_STATUS(IVAL(cli->inbuf,smb_rcls)) ) )
|
||||
return True;
|
||||
|
||||
return False;
|
||||
@ -605,9 +605,17 @@ BOOL cli_resolve_path( const char *mountpt, struct cli_state *rootcli, const cha
|
||||
return True;
|
||||
}
|
||||
|
||||
/* special case where client asked for a path that does not exist */
|
||||
|
||||
if ( cli_dfs_check_error(rootcli, NT_STATUS_OBJECT_NAME_NOT_FOUND) ) {
|
||||
*targetcli = rootcli;
|
||||
pstrcpy( targetpath, path );
|
||||
return True;
|
||||
}
|
||||
|
||||
/* we got an error, check for DFS referral */
|
||||
|
||||
if ( !cli_dfs_check_error(rootcli) )
|
||||
if ( !cli_dfs_check_error(rootcli, NT_STATUS_PATH_NOT_COVERED) )
|
||||
return False;
|
||||
|
||||
/* check for the referral */
|
||||
|
@ -670,7 +670,6 @@ static int net_groupmap_listmem(int argc, const char **argv)
|
||||
DOM_SID alias;
|
||||
DOM_SID *members;
|
||||
int i, num;
|
||||
NTSTATUS result;
|
||||
|
||||
if ( (argc != 1) ||
|
||||
!string_to_sid(&alias, argv[0]) ) {
|
||||
@ -679,8 +678,7 @@ static int net_groupmap_listmem(int argc, const char **argv)
|
||||
}
|
||||
|
||||
if (!pdb_enum_aliasmem(&alias, &members, &num)) {
|
||||
d_printf("Could not list members for sid %s: %s\n",
|
||||
argv[0], nt_errstr(result));
|
||||
d_printf("Could not list members for sid %s\n", argv[0]);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user