s3:smbclient: Allow last dos attribute to be cleared
authorSteve French <smfrench@gmail.com>
Thu, 13 Jul 2017 18:57:53 +0000 (13:57 -0500)
committerJeremy Allison <jra@samba.org>
Fri, 14 Jul 2017 00:43:47 +0000 (02:43 +0200)
commita4c3ee6767d768365a47bfda32a26cb7994b3787
treea67d4a1102c66ce9e35864488088953625a0d405
parentdf0db9d8f893f9245c6289200303b94a6e2d48d0
s3:smbclient: Allow last dos attribute to be cleared

With the upgrade to SMB3.1.1 from cifs for smbclient,
setmode no longer works when removing attributes,
if the resultant attribute is 0 it is skipped
(unlike for the old cifs setpathinfo).

When clearing the final attribute, pass in ATTRIBUTE_NORMAL
instead of zero.

This also removes a redundant cli_setatr call
when clearing attributes (cli_setatr was being called
twice).

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12899

Signed-off-by: Steve French <sfrench@samba.org>
Reviewed-by: Anne Marie Merritt <annemarie.merritt@primarydata.com>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Jul 14 02:43:47 CEST 2017 on sn-devel-144
source3/client/client.c