Bug 14774 - Some *acl_sys_set_fd() prototypes have 3 arguments, functions have 4
Summary: Some *acl_sys_set_fd() prototypes have 3 arguments, functions have 4
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: VFS Modules (show other bugs)
Version: 4.14.6
Hardware: All Solaris
: P5 normal (vote)
Target Milestone: ---
Assignee: Jule Anger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-30 19:20 UTC by David Gajewski
Modified: 2021-08-24 13:25 UTC (History)
1 user (show)

See Also:


Attachments
possible patch to include type into some 3 argument *acl_sys_set_fd() refs (1.75 KB, patch)
2021-07-30 19:20 UTC, David Gajewski
no flags Details
git-am fix for 4.14.next. (3.58 KB, patch)
2021-08-03 00:15 UTC, Jeremy Allison
slow: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Gajewski 2021-07-30 19:20:02 UTC
Created attachment 16706 [details]
possible patch to include type into some 3 argument *acl_sys_set_fd() refs

In the stable release 4.14.6 the prototype for solarisacl_sys_acl_set_fd() in s3/modules/vfs_solarisacl.h is listed with 3 arguments, while the code in s3/modules/vfs_solarisacl.c has 4.  This leads to a compile error.  The latter reflects the upcoming release, with code in solarisacl_sys_acl_set_fd() checking for the type.

The commit was "vfs: add acl type arg to SMB_VFS_SYS_ACL_SET_FD()" that made the partial change.  Later commits which updated the header files and other files may be desired since much code is touched.  Or not since this branch is meant to be stable.  If the later, a patch mimicking what was done with posixacl_sys_acl_set_fd() is attached.

solarisacl_sys_acl_set_fd() is only called from sys_acl_set_fd() in s3/lib/sysacls.c which in turn is only called by vfswrap_sys_acl_set_fd() in s3/modules/vfs_default.c when type == SMB_ACL_TYPE_ACCESS.  The proposed patch mimics the call to posixacl_sys_acl_set_fd() by setting the type argument to SMB_ACL_TYPE_ACCESS.

More OS's, like tru64 and aix, are also affected and are updated the same way to resolve compile errors. The patch updates s3/lib/sysacls.c and the header files (except for aix, which doesn't seem to exist? but is also 4 args in vfs_aixacl.c but 3 in s3/lib/sysacls.c).  hpux uses 3 arguments everywhere and that is not changed here.

The upcoming release is not affected, only the 4.14 line.
Comment 1 Jeremy Allison 2021-08-03 00:15:15 UTC
Created attachment 16711 [details]
git-am fix for 4.14.next.

Assigned to Ralph for review for 4.14.next. No ci, as this is only changing non-tested OS's.

David, can you confirm you're happy with this and the 'Signed-off-by:'. You might also want to send in a "Samba Developer's Declaration" as specified here:

https://www.samba.org/samba/devel/copyright-policy.html

if you're going to be patching Samba more in future ! Thanks a lot for your help.
Comment 2 David Gajewski 2021-08-03 17:22:45 UTC
Confirmed -  I'm OK with "Signed-off-by:" addition.  I'll look into that "Samba Developer's Declaration" for the future.
Comment 3 Ralph Böhme 2021-08-06 16:26:49 UTC
Reassigning to Jule for inclusion in 4.14 (only, not 4.15 or 4.13!).
Comment 4 Ralph Böhme 2021-08-06 16:30:22 UTC
(In reply to Ralph Böhme from comment #3)
Please add my reviewed-by before pushing... :)
Comment 5 Jule Anger 2021-08-09 11:25:35 UTC
(In reply to Ralph Böhme from comment #3)
Reviewed-by added and pushed to autobuild-v4-14-test.
Comment 6 Samba QA Contact 2021-08-10 12:42:05 UTC
This bug was referenced in samba v4-14-test:

340aff1c8f419c5b1ce18fa5f8b080d4426da65f
Comment 7 Jule Anger 2021-08-11 07:42:49 UTC
Closing out bug report.

Thanks!
Comment 8 Samba QA Contact 2021-08-24 13:25:20 UTC
This bug was referenced in samba v4-14-stable (Release samba-4.14.7):

340aff1c8f419c5b1ce18fa5f8b080d4426da65f