X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=src%2Fuserplex.c;h=77f79d74e2f76ebc873705b13acafa73316c37eb;hb=1755d287f3cd52e739bf5b2e7392f894ee82d469;hp=565884d0d0632a31506a3d5f2935e7e7ee2613d9;hpb=1376c0cd7305687b21c21664e4f3919e9f5fbddb;p=ashd.git diff --git a/src/userplex.c b/src/userplex.c index 565884d..77f79d7 100644 --- a/src/userplex.c +++ b/src/userplex.c @@ -80,12 +80,12 @@ static void login(struct passwd *pwd) /* There's whole load of other stuff one could want to do here -- * getting Kerberos credentials, running PAM session modules, and * who knows what. I'll add them along as I find them useful. */ - if(((fd = open(".ashd/output", O_APPEND)) >= 0) || + if(((fd = open(".ashd/output", O_WRONLY | O_APPEND)) >= 0) || ((fd = open("/dev/null", 0)) >= 0)) { dup2(fd, 1); close(fd); } - if(((fd = open(".ashd/error", O_APPEND)) >= 0) || + if(((fd = open(".ashd/error", O_WRONLY | O_APPEND)) >= 0) || ((fd = open("/dev/null", 0)) >= 0)) { dup2(fd, 2); close(fd);