From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,5d38512424d8e6c1,start X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 2001-08-10 07:11:21 PST Path: archiver1.google.com!newsfeed.google.com!postnews1.google.com!not-for-mail From: grprasad@commvault.com (prasad) Newsgroups: comp.unix.osf.osf1 Subject: acl_set_permset always dumps core.... Help please.. Date: 10 Aug 2001 07:11:21 -0700 Organization: http://groups.google.com/ Message-ID: <4cd4ffb.0108100611.3869ddab@posting.google.com> NNTP-Posting-Host: 151.198.95.254 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 997452681 24256 127.0.0.1 (10 Aug 2001 14:11:21 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 10 Aug 2001 14:11:21 GMT Xref: archiver1.google.com comp.unix.osf.osf1:31 First, Apologies for a long mail. Tru64 gurus, I found acl_set_permset()(of libpacl.so) always dumps core. (Even if I am a root user or developer or whatever).This code is written in accordance to ACL guidelines given by TRU64 documentation. ANY HELP IS APPRCIATED. I guess there is something wrong setting the permission...Is there any software to be installed specifically for security? Below you can see: 1. Full Program 2. The debugger output just before core dump 3. cxx version and uname. 4. More info from sysconfig. Thanks, Raghuprasad Reference Manual: http://www.tru64unix.compaq.com/docs/base_doc/DOCUMENTATION/V50_PDF/ARH95ATE.PDF 1. cxx -V Compaq C++ V6.3-008 for Compaq Tru64 UNIX V5.1 (Rev. 732) Compiler Driver V6.3-008 (cxx) cxx Driver 2. uname -a OSF1 gamecube V5.1 732 alpha 3. PROGRAM: ================ #include struct entries { acl_tag_t tag_type; char *qualifier; acl_permset_t perms; } table[] = { { ACL_USER_OBJ, NULL, (acl_permset_t)ACL_PRDWREX }, { ACL_USER, "klad", (acl_permset_t)ACL_PRDEX }, { ACL_USER, "snk", (acl_permset_t)ACL_PRDEX }, { ACL_GROUP_OBJ, NULL, (acl_permset_t)ACL_PRDWREX }, { ACL_GROUP, "mktg", (acl_permset_t)ACL_PRDWREX }, { ACL_OTHER_OBJ, NULL, (acl_permset_t)ACL_PRDEX } }; #define TABLE_ENTRIES (sizeof(table)/sizeof(table[0])) int main() { char *filename = "dig_test"; acl_t acl_p; acl_entry_t entry_p; int i; uid_t uid; gid_t gid; acl_p = acl_init (sizeof(table)); for (i = 0 ; i < TABLE_ENTRIES; i++) { if ( (entry_p = acl_create_entry(&acl_p)) == (acl_entry_t)NULL){ perror("acl_create_entry"); exit(2); } if (acl_set_permset(entry_p, (acl_permset_t)table[i].perms) != 0) { <== dumps core in this call perror("acl_set_permset"); exit(3); } switch(table[i].tag_type) { case ACL_USER: acl_set_qualifier(entry_p, (void *)table[i].qualifier); acl_set_tag_type(entry_p, table[i].tag_type); break; case ACL_GROUP: acl_set_qualifier(entry_p, (void *)table[i].qualifier); acl_set_tag_type(entry_p, table[i].tag_type); break; default: acl_set_qualifier(entry_p, (void *)table[i].qualifier); acl_set_tag_type(entry_p, table[i].tag_type); break; } /* End of switch stmt */ } /* End of for loop */ if (acl_set_file(filename, ACL_TYPE_ACCESS, acl_p) < 0) { perror("acl_set_file"); } acl_free(acl_p); return(0); } 4. ladebug DEBUGGER OUTPUT: ================================ stopped at [int main(void):29 0x120001988] 29 if ( (entry_p = acl_create_entry(&acl_p)) == (acl_entry_t)NULL) { (ladebug) stopped at [int main(void):34 0x1200019d4] 34 if (acl_set_permset(entry_p, (acl_permset_t)table[i].perms) != 0) { (ladebug) p entry_p 0x140002800 (ladebug) p *entry_p struct acl_entry { entry = 0x140004d40; head = 0x140004d00; next = 0x140002800; prev = 0x140002800; acl_magic = 61456; size = 20; } (ladebug) p table[i].perms More than one symbol named "table" visible. Error: no value for table[i].perms (ladebug) next <== Segmentation Violation here Thread received signal SEGV The "next " command was not completed. stopped at [ acl_mod_perm(...) 0x3ff80fd4380] (ladebug) Thread received signal SEGV The "next " command was not completed. stopped at [ acl_mod_perm(...) 0x3ff80fd4380] (ladebug) 5. More Info from Sysconfig: ============================ acl_mode is enabled. See below for More Input: # sysconfig -r sec acl_mode=enable acl_mode: reconfigured # sysconfig -q sec sec: acl_mode = enable audit_buffer_size = 16 audit_site_events = 64 nfs_flatten_mode = 0 ufs_sec_proplist_max_entry = 1548 ufs_proplist_max_entry = 8192 # ./dig_acl Memory fault(coredump) # ladebug ./dig_acl ./core Welcome to the Ladebug Debugger Version 4.0-58 ------------------ object file name: ./dig_acl core file name: ./core Reading symbolic information ...done Core file produced from executable dig_acl Thread terminated at PC 0x3ff80fd4380 by signal SEGV (ladebug) where >0 0x3ff80fd4380 in acl_mod_perm(0x140002800, 0x7, 0x0, 0x0, 0x2, 0x1) in /usr/shlib/libpacl.so #1 0x1200019f8 in main() "dig_acl.c":34 #2 0x120001868 in __start(0x140002800, 0x7, 0x0, 0x0, 0x2, 0x1) in ./dig_acl (ladebug) Line 34: if (acl_set_permset(entry_p, (acl_permset_t)table[i].perms) != 0) {