changeset 4437:a0066aa9678b HEAD

Don't crash when checking "owner" ACLs with shared namespaces.
author Timo Sirainen <tss@iki.fi>
date Sun, 25 Jun 2006 00:03:13 +0300
parents 2b7254c5809c
children 00db36e1b734
files src/plugins/acl/acl-backend.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/plugins/acl/acl-backend.c	Sat Jun 24 23:54:35 2006 +0300
+++ b/src/plugins/acl/acl-backend.c	Sun Jun 25 00:03:13 2006 +0300
@@ -44,7 +44,8 @@
 	backend->v = acl_backend_vfile;
 	backend->storage = storage;
 	backend->username = p_strdup(backend->pool, acl_username);
-	backend->owner_username = p_strdup(backend->pool, owner_username);
+	backend->owner_username = owner_username == NULL ? "" :
+		p_strdup(backend->pool, owner_username);
 	backend->group_count = group_count;
 
 	storage_owner = owner_username != NULL &&