s3:modules properly terminate enums in nfs4 acl code
authorChristian Ambach <ambi@samba.org>
Tue, 24 May 2011 17:01:22 +0000 (19:01 +0200)
committerChristian Ambach <ambi@samba.org>
Tue, 24 May 2011 18:13:39 +0000 (20:13 +0200)
same issue as with the audit modules:
using a wrong parameter leads to smbd crash as lp_enum()
will not terminate on last entry of the array

Autobuild-User: Christian Ambach <ambi@samba.org>
Autobuild-Date: Tue May 24 20:13:39 CEST 2011 on sn-devel-104

source3/modules/nfs4_acls.c

index 91e98f6be83a7770e107795f7609ef89ad3652a4..c841d83db2688b599d3f1815aaa384234d81139c 100644 (file)
@@ -398,13 +398,15 @@ static int smbacl4_get_vfs_params(
 {
        static const struct enum_list enum_smbacl4_modes[] = {
                { e_simple, "simple" },
-               { e_special, "special" }
+               { e_special, "special" },
+               { -1 , NULL }
        };
        static const struct enum_list enum_smbacl4_acedups[] = {
                { e_dontcare, "dontcare" },
                { e_reject, "reject" },
                { e_ignore, "ignore" },
                { e_merge, "merge" },
+               { -1 , NULL }
        };
 
        memset(params, 0, sizeof(smbacl4_vfs_params));