From b991d32e63b526ebbf1102bc6cb2af068afb4be4 Mon Sep 17 00:00:00 2001 From: Michael Spang Date: Tue, 15 Jan 2008 17:49:13 -0500 Subject: [PATCH] Fix magic --- src/addclub.c | 3 +++ src/addmember.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/addclub.c b/src/addclub.c index becc7dc..fb26587 100644 --- a/src/addclub.c +++ b/src/addclub.c @@ -45,6 +45,7 @@ int addclub() { int krb_ok, user_ok, group_ok, sudo_ok, home_ok, quota_ok; int id; char homedir[1024]; + char acl_s[1024], dacl_s[1024]; acl_t acl = NULL, dacl = NULL; logmsg("adding uid=%s cn=%s by %s", userid, name, user); @@ -56,12 +57,14 @@ int addclub() { deny("user %s already exists", userid); snprintf(homedir, sizeof(homedir), "%s/%s", club_home, userid); + snprintf(acl_s, sizeof(acl_s), club_home_acl, userid); acl = acl_from_text(club_home_acl); if (acl == NULL) fatalpe("Unable to parse club_home_acl"); if (*club_home_acl) { + snprintf(dacl_s, sizeof(dacl_s), club_home_dacl, userid); dacl = acl_from_text(club_home_dacl); if (dacl == NULL) fatalpe("Unable to parse club_home_dacl"); diff --git a/src/addmember.c b/src/addmember.c index 16a2076..581bbb3 100644 --- a/src/addmember.c +++ b/src/addmember.c @@ -50,6 +50,7 @@ int addmember() { int krb_ok, user_ok, group_ok, home_ok, quota_ok; int id; char homedir[1024]; + char acl_s[1024], dacl_s[1024]; acl_t acl = NULL, dacl = NULL; logmsg("adding uid=%s cn=%s program=%s by %s", userid, name, program, user); @@ -61,12 +62,14 @@ int addmember() { deny("user %s already exists", userid); snprintf(homedir, sizeof(homedir), "%s/%s", member_home, userid); + snprintf(acl_s, sizeof(acl_s), club_home_acl, userid); acl = acl_from_text(member_home_acl); if (acl == NULL) fatalpe("Unable to parse member_home_acl"); if (*member_home_acl) { + snprintf(dacl_s, sizeof(dacl_s), club_home_dacl, userid); dacl = acl_from_text(member_home_dacl); if (dacl == NULL) fatalpe("Unable to parse member_home_dacl");