xfs
[Top] [All Lists]

Samba panic with ACLs

To: Timothy Shimmin <tes@xxxxxxxxxxxxxxxxxxxxxxx>
Subject: Samba panic with ACLs
From: Hasch@xxxxxxxxxxx (Juergen Hasch)
Date: Tue, 19 Jun 2001 19:54:38 +0200
Cc: linux-xfs <linux-xfs@xxxxxxxxxxx>
References: <3B2E7B5A.C0088BBF@t-online.de>
Sender: owner-linux-xfs@xxxxxxxxxxx
There is a bug in acl.c/acl_get_qualifier. The Posix draft states
the object returned by acl_get_qualifier should be cleared using
acl_free. This crashes Samba because we only return a pointer from
inside an existing object.
The patch below fixes this, I somehow missed this before...

--- acl.orig    Fri Jun  8 22:53:48 2001
+++ acl.c       Tue Jun 19 19:43:37 2001
@@ -996,6 +996,8 @@
 void *
 acl_get_qualifier (acl_entry_t entry_d)
 {
+       uid_t *retval;
+
        if(entry_d == NULL){
                setoserror(EINVAL);
                return NULL;
        }
        
-       return &entry_d->ae_id;
+       retval = malloc(sizeof(uid_t));
+       if (!retval)
+               return NULL;
+       *retval = entry_d->ae_id;
+       return retval;
 }
 
 int

<Prev in Thread] Current Thread [Next in Thread>