Fix for mbuseradd on Fedora

This commit is contained in:
Michiel Broek 2004-03-16 20:54:51 +00:00
parent 4bcd02a4d5
commit 80e8422263
3 changed files with 9 additions and 2 deletions

View File

@ -82,6 +82,10 @@ v0.51.2 06-Mar-2004
Changed default charset for new mailgroups and message areas Changed default charset for new mailgroups and message areas
to CP437. to CP437.
mbuseradd:
Fixed removing of a OS created homedir. This may solve problems
on RH and Fedora (under test).
examples: examples:
Updated English, German, Spanish and Dutch macro files: Updated English, German, Spanish and Dutch macro files:
html.nodes and filemgr.status. html.nodes and filemgr.status.

3
TODO
View File

@ -14,6 +14,9 @@ $Id$
L = Cosmetic or nice to have. L = Cosmetic or nice to have.
X = Will not be done unless it's really needed. X = Will not be done unless it's really needed.
general:
N: Investigate the wait logmessages on Fedora.
everything: everything:
L: Consider XML format for databases. L: Consider XML format for databases.

View File

@ -103,7 +103,7 @@ int execute(char **args, char *in, char *out, char *err)
void makedir(char *path, mode_t mode, uid_t owner, gid_t group) void makedir(char *path, mode_t mode, uid_t owner, gid_t group)
{ {
if (mkdir(path, mode) != 0) { if (mkdir(path, mode) != 0) {
syslog(LOG_WARNING, "Can't create directory %s", path); syslog(LOG_WARNING, "Can't create directory %s:%s", path, strerror(errno));
exit(2); exit(2);
} }
if ((chown(path, owner, group)) == -1) { if ((chown(path, owner, group)) == -1) {
@ -248,7 +248,7 @@ int main(int argc, char *argv[])
* some systems have already created a home directory. If one is found * some systems have already created a home directory. If one is found
* it is removed to create a fresh one. * it is removed to create a fresh one.
*/ */
if ((access(temp, R_OK)) == 0) { if ((access(homedir, R_OK)) == 0) {
if ((access("/bin/rm", X_OK)) == 0) if ((access("/bin/rm", X_OK)) == 0)
args[0] = (char *)"/bin/rm"; args[0] = (char *)"/bin/rm";
else if ((access("/usr/bin/rm", X_OK)) == 0) else if ((access("/usr/bin/rm", X_OK)) == 0)