Expected behaviour: "@return 0 on success, < 0 on error" (from function comment). Actual behaviour: returns positive value on success, < 0 on error. In the code you can see that getxattr() uses cacl_get(): https://github.com/samba-team/samba/blob/f753e2f7acf8f3394a5f1107344d0323acc05694/source3/libsmb/libsmb_xattr.c#L2169 And then forwards the return value from cacl_get(): https://github.com/samba-team/samba/blob/f753e2f7acf8f3394a5f1107344d0323acc05694/source3/libsmb/libsmb_xattr.c#L2179 Meanwhile, cacl_get() returns a non-zero value called "n_used": https://github.com/samba-team/samba/blob/f753e2f7acf8f3394a5f1107344d0323acc05694/source3/libsmb/libsmb_xattr.c#L1488 (@Nable80 suggested the bugreport)
This bug was referenced in samba master: 74636dfe24c15677261fc40c0a4ec62404898cf4 bdbb38d16c8eaff33484bb747efa639c4d8e7f35
Created attachment 17610 [details] git-am fix for 4.17.next, 4.16.next. Cherry-picked cleanly from master.
Comment on attachment 17610 [details] git-am fix for 4.17.next, 4.16.next. Ping David - can we get this into the next release please ?
Reassigning to Jule for inclusion in 4.16 and 4.17.
Pushed to autobuild-v4-{17,16}-test.
This bug was referenced in samba v4-16-test: 628a1c338277f3fc4250fd54809bf326ec15c0ef 113536e0d735a5235f8be29d4fd1cfc8177930b1
This bug was referenced in samba v4-17-test: a92a0043493f678338ecdefa49810e91f6bb2a1a 50330f69a073915c604070a1889e92af0f0a2006
Closing out bug report. Thanks!
This bug was referenced in samba v4-17-stable (Release samba-4.17.5): a92a0043493f678338ecdefa49810e91f6bb2a1a 50330f69a073915c604070a1889e92af0f0a2006