Bug 7239 - Function aixacl_sys_acl_get_file not declared / coredump
Summary: Function aixacl_sys_acl_get_file not declared / coredump
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.5
Classification: Unclassified
Component: File services (show other bugs)
Version: 3.5.1
Hardware: PPC AIX
: P3 normal
Target Milestone: ---
Assignee: Jule Anger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-11 08:32 UTC by Heinrich Mislik
Modified: 2022-03-15 13:25 UTC (History)
1 user (show)

See Also:


Attachments
backported patch for 4.15 and 4.16 (2.35 KB, patch)
2022-02-19 22:38 UTC, Björn Jacke
metze: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Heinrich Mislik 2010-03-11 08:32:03 UTC
The functions aixacl_sys_acl_get_file and aixacl_sys_acl_get_fd are not declared in any header file. This results in:

Compiling lib/sysacls.c
"/tmp/samba-3.5.1/source3/lib/sysacls.c", line 396.39: 1506-068 (W) Operation between types "struct smb_acl_t*" and "int" is not allowed.
"/tmp/samba-3.5.1/source3/lib/sysacls.c", line 401.37: 1506-068 (W) Operation between types "struct smb_acl_t*" and "int" is not allowed.

CC=/usr/vac/bin/cc, gcc gives a similar warning.

Since I'm compiling for 64-bit, the 64 bit long pointer struct smb_acl_t* gets truncated to a 32 bit int. This results in SIGSEGV, when the pointer later is used.

As a quick test, I put these two lines into lib/sysacl.c:

SMB_ACL_T aixacl_sys_acl_get_file(vfs_handle_struct*, const char*, SMB_ACL_TYPE_T);
SMB_ACL_T aixacl_sys_acl_get_fd(vfs_handle_struct *, files_struct *);

This fixes the bug.

The complete patch is to create and include modules/vfs_aixacl.h as already existing for other OS's.
Comment 1 Samba QA Contact 2022-02-18 23:13:05 UTC
This bug was referenced in samba master:

396c17160c19c6df43123074bf62268c6ed0f9e4
Comment 2 Björn Jacke 2022-02-19 22:38:13 UTC
Created attachment 17173 [details]
backported patch for 4.15 and 4.16
Comment 3 Jule Anger 2022-02-27 16:26:27 UTC
Pushed to autobuild-v4-{16,15}-test.
Comment 4 Samba QA Contact 2022-02-27 17:55:22 UTC
This bug was referenced in samba v4-15-test:

0128222daf042591e1045387d56bbb62ff73a316
Comment 5 Samba QA Contact 2022-02-27 20:04:04 UTC
This bug was referenced in samba v4-16-test:

e82833a107834cdfaef72e5a2c805a780ef2cba5
Comment 6 Jule Anger 2022-02-28 09:19:37 UTC
Closing out bug report.

Thanks!
Comment 7 Samba QA Contact 2022-03-01 08:55:29 UTC
This bug was referenced in samba v4-16-stable (Release samba-4.16.0rc4):

e82833a107834cdfaef72e5a2c805a780ef2cba5
Comment 8 Samba QA Contact 2022-03-15 13:25:29 UTC
This bug was referenced in samba v4-15-stable (Release samba-4.15.6):

0128222daf042591e1045387d56bbb62ff73a316