]> git.ipfire.org Git - thirdparty/samba.git/commit
s3: libsmb: Reverse sense of 'clear all attributes', ignore attribute change in SMB2...
authorJeremy Allison <jra@samba.org>
Mon, 17 Jul 2017 17:37:15 +0000 (10:37 -0700)
committerKarolin Seeger <kseeger@samba.org>
Mon, 14 Aug 2017 08:50:09 +0000 (10:50 +0200)
commit9792ec26373869f7613a12b09a911366442746d4
tree53d852fa03e1e9fa8812af4b334ec3bf6f0953ca
parent3475d11fe95b4b1afc8ba2731f2853503f44c02b
s3: libsmb: Reverse sense of 'clear all attributes', ignore attribute change in SMB2 to match SMB1.

SMB1 uses attr == 0 to clear all attributes
on a file (end up with FILE_ATTRIBUTE_NORMAL),
and attr == FILE_ATTRIBUTE_NORMAL to mean ignore
request attribute change.

SMB2 uses exactly the reverse. Unfortunately as the
cli_setatr() ABI is exposed inside libsmbclient,
we must make the SMB2 cli_smb2_setatr() call
export the same ABI as the SMB1 cli_setatr()
which calls it. This means reversing the sense
of the requested attr argument if it's zero
or FILE_ATTRIBUTE_NORMAL.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
(cherry picked from commit f1cc79a46d56bda99c392d491d88479cd6427a32)
source3/libsmb/cli_smb2_fnum.c