int sys_acl_get_entry(SMB_ACL_T theacl, int entry_id, SMB_ACL_ENTRY_T *entry_p)
{
struct acl_entry_link *link;
- struct new_acl_entry *entry;
int keep_going;
if (entry_id == SMB_ACL_FIRST_ENTRY)
for (keep_going = 0; keep_going < theacl->count; keep_going++)
link = link->nextp;
- entry = *entry_p = link->entryp;
+ *entry_p = link->entryp;
- DEBUG(10, ("*entry_p is %d\n", entry_p));
- DEBUG(10, ("*entry_p->ace_access is %d\n", entry->ace_access));
+#if 0
+ {
+ struct new_acl_entry *entry = *entry_p;
+ DEBUG(10, ("*entry_p is %lx\n", (long)entry));
+ DEBUG(10, ("*entry_p->ace_access is %d\n", entry->ace_access));
+ }
+#endif
/* Increment count */
theacl->count++;
{
struct acl_entry_link *theacl;
struct acl_entry_link *acl_entryp;
- struct acl_entry_link *temp_entry;
+ struct acl_entry_link *temp_entry = NULL;
int counting;
DEBUG(10, ("Entering the sys_acl_create_entry\n"));
static struct idlist *uidlist, *uidmap;
static struct idlist *gidlist, *gidmap;
+static inline int id_eq_uid(id_t id, uid_t uid)
+{
+ return id == (id_t)uid;
+}
+
+static inline int id_eq_gid(id_t id, gid_t gid)
+{
+ return id == (id_t)gid;
+}
+
static id_t id_parse(const char *num_str)
{
id_t tmp, num = 0;
else if (*name && id) {
if (idlist_ptr == &uidlist) {
uid_t uid;
- id2 = user_to_uid(name, &uid, False) ? uid : id;
+ id2 = user_to_uid(name, &uid, False) ? (id_t)uid : id;
} else {
gid_t gid;
- id2 = group_to_gid(name, &gid, False) ? gid : id;
+ id2 = group_to_gid(name, &gid, False) ? (id_t)gid : id;
}
} else
id2 = id;
static struct idlist *last = NULL;
struct idlist *list;
- if (last && uid == last->id)
+ if (last && id_eq_uid(last->id, uid))
return last->id2;
for (list = uidlist; list; list = list->next) {
- if (list->id == uid)
+ if (id_eq_uid(list->id, uid))
break;
}
static struct idlist *last = NULL;
struct idlist *list;
- if (last && gid == last->id)
+ if (last && id_eq_gid(last->id, gid))
list = last;
else {
for (list = gidlist; list; list = list->next) {
- if (list->id == gid)
+ if (id_eq_gid(list->id, gid))
break;
}
if (!list)
union name_or_id noiu;
for (list = uidlist; list; list = list->next) {
- if (list->id == uid)
+ if (id_eq_uid(list->id, uid))
return NULL;
}
union name_or_id noiu;
for (list = gidlist; list; list = list->next) {
- if (list->id == gid)
+ if (id_eq_gid(list->id, gid))
return NULL;
}