* acl types.
*/
-static int hpux_count_obj(int acl_count, struct acl *aclp, struct hpux_acl_types *acl_type_count)
+static void hpux_count_obj(int acl_count, struct acl *aclp, struct hpux_acl_types *acl_type_count)
{
int i;
struct new_acl_entry *entry;
int keep_going;
+ if (entry_id == SMB_ACL_FIRST_ENTRY)
+ theacl->count = 0;
+ else if (entry_id != SMB_ACL_NEXT_ENTRY) {
+ errno = EINVAL;
+ return -1;
+ }
+
DEBUG(10,("This is the count: %d\n",theacl->count));
/* Check if count was previously set to -1. *
struct acl_entry_link *acl_entry_link_head;
int i;
int rc = 0;
- uid_t user_id;
/* AIX has no DEFAULT */
if ( type == SMB_ACL_TYPE_DEFAULT ) {
struct acl_entry_link *acl_entry_link_head;
int i;
int rc = 0;
- uid_t user_id;
/* Get the acl using fstatacl */
return -1;
if (*tag_type_p == SMB_ACL_USER || *tag_type_p == SMB_ACL_GROUP)
- *u_g_id_p = entry->ace_id->id_data;
+ memcpy(u_g_id_p, entry->ace_id->id_data, sizeof (id_t));
permset = &entry->ace_access;
{
struct acl_entry_link *theacl = NULL;
+ if (count < 0) {
+ errno = EINVAL;
+ return NULL;
+ }
+
DEBUG(10,("Entering sys_acl_init\n"));
theacl = SMB_MALLOC_P(struct acl_entry_link);
struct acl_entry *acl_entry = NULL;
struct ace_id *ace_id = NULL;
uint id_type;
- uint ace_access;
uint user_id;
uint acl_length;
uint rc;
memcpy(acl_entry->ace_id->id_data, &user_id, sizeof(uid_t));
}
- rc = chacl(name,file_acl,file_acl->acl_len);
+ rc = chacl((char*)name,file_acl,file_acl->acl_len);
DEBUG(10,("errno is %d\n",errno));
DEBUG(10,("return code is %d\n",rc));
SAFE_FREE(file_acl);
}
#endif
-int sys_acl_delete_def_file(const char *name)
+int sys_acl_delete_def_file(UNUSED(const char *name))
{
/* AIX has no default ACL */
return 0;
rc = mbr_uid_to_uuid(u_g_id, uu);
else
rc = mbr_gid_to_uuid(u_g_id, uu);
+ if (rc != 0)
+ return rc;
if (acl_set_tag_type(entry, tag_type) != 0
|| acl_set_qualifier(entry, &uu) != 0