projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
On today's systems fork() will hardly fail, thus removed the fork retry loops.
[mmh]
/
uip
/
aliasbr.c
diff --git
a/uip/aliasbr.c
b/uip/aliasbr.c
index
073b1b2
..
baeab6f
100644
(file)
--- a/
uip/aliasbr.c
+++ b/
uip/aliasbr.c
@@
-360,8
+360,8
@@
addgroup(struct aka *ak, char *grp)
}
#ifdef DBMPWD
if ((pw = getpwnam(gp))) {
}
#ifdef DBMPWD
if ((pw = getpwnam(gp))) {
- hmalloc(pw);
- add_aka(ak, gp);
+ hmalloc(pw);
+ add_aka(ak, gp);
}
}
#endif /* DBMPWD */
}
}
#endif /* DBMPWD */
@@
-444,7
+444,7
@@
add_aka(struct aka *ak, char *pp)
ad = (struct adr *) mh_xmalloc(sizeof(*ad));
ad->ad_text = getcpy(pp);
ad = (struct adr *) mh_xmalloc(sizeof(*ad));
ad->ad_text = getcpy(pp);
- ad->ad_local = strchr(pp, '@') == NULL && strchr(pp, '!') == NULL;
+ ad->ad_local = strchr(pp, '@') == NULL;
ad->ad_next = NULL;
if (ak->ak_addr)
ld->ad_next = ad;
ad->ad_next = NULL;
if (ak->ak_addr)
ld->ad_next = ad;
@@
-516,10
+516,11
@@
hmalloc(struct passwd *pw)
p->h_shell = getcpy(pw->pw_shell);
p->h_ngrps = 0;
p->h_next = NULL;
p->h_shell = getcpy(pw->pw_shell);
p->h_ngrps = 0;
p->h_next = NULL;
- if (hometail != NULL)
- hometail->h_next = p;
- if (homehead == NULL)
+ /* append to end */
+ if (!homehead)
homehead = p;
homehead = p;
+ if (hometail)
+ hometail->h_next = p;
hometail = p;
return p;
hometail = p;
return p;