Fix magic

This commit is contained in:
Michael Spang 2008-01-15 17:49:13 -05:00
parent 07f696ab3f
commit b991d32e63
2 changed files with 6 additions and 0 deletions

View File

@ -45,6 +45,7 @@ int addclub() {
int krb_ok, user_ok, group_ok, sudo_ok, home_ok, quota_ok; int krb_ok, user_ok, group_ok, sudo_ok, home_ok, quota_ok;
int id; int id;
char homedir[1024]; char homedir[1024];
char acl_s[1024], dacl_s[1024];
acl_t acl = NULL, dacl = NULL; acl_t acl = NULL, dacl = NULL;
logmsg("adding uid=%s cn=%s by %s", userid, name, user); logmsg("adding uid=%s cn=%s by %s", userid, name, user);
@ -56,12 +57,14 @@ int addclub() {
deny("user %s already exists", userid); deny("user %s already exists", userid);
snprintf(homedir, sizeof(homedir), "%s/%s", club_home, 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); acl = acl_from_text(club_home_acl);
if (acl == NULL) if (acl == NULL)
fatalpe("Unable to parse club_home_acl"); fatalpe("Unable to parse club_home_acl");
if (*club_home_acl) { if (*club_home_acl) {
snprintf(dacl_s, sizeof(dacl_s), club_home_dacl, userid);
dacl = acl_from_text(club_home_dacl); dacl = acl_from_text(club_home_dacl);
if (dacl == NULL) if (dacl == NULL)
fatalpe("Unable to parse club_home_dacl"); fatalpe("Unable to parse club_home_dacl");

View File

@ -50,6 +50,7 @@ int addmember() {
int krb_ok, user_ok, group_ok, home_ok, quota_ok; int krb_ok, user_ok, group_ok, home_ok, quota_ok;
int id; int id;
char homedir[1024]; char homedir[1024];
char acl_s[1024], dacl_s[1024];
acl_t acl = NULL, dacl = NULL; acl_t acl = NULL, dacl = NULL;
logmsg("adding uid=%s cn=%s program=%s by %s", userid, name, program, user); 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); deny("user %s already exists", userid);
snprintf(homedir, sizeof(homedir), "%s/%s", member_home, 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); acl = acl_from_text(member_home_acl);
if (acl == NULL) if (acl == NULL)
fatalpe("Unable to parse member_home_acl"); fatalpe("Unable to parse member_home_acl");
if (*member_home_acl) { if (*member_home_acl) {
snprintf(dacl_s, sizeof(dacl_s), club_home_dacl, userid);
dacl = acl_from_text(member_home_dacl); dacl = acl_from_text(member_home_dacl);
if (dacl == NULL) if (dacl == NULL)
fatalpe("Unable to parse member_home_dacl"); fatalpe("Unable to parse member_home_dacl");