From 9e70ef793ddcf51edc0f6489eb6f70762380afc0 Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Sun, 13 May 2012 08:09:48 +0200 Subject: [PATCH] userplex: Corrected opening of /dev/null. --- src/userplex.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/userplex.c b/src/userplex.c index 699cbe5..357d791 100644 --- a/src/userplex.c +++ b/src/userplex.c @@ -87,12 +87,12 @@ static void login(struct passwd *pwd) * 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_WRONLY | O_APPEND)) >= 0) || - ((fd = open("/dev/null", 0)) >= 0)) { + ((fd = open("/dev/null", O_WRONLY)) >= 0)) { dup2(fd, 1); close(fd); } if(((fd = open(".ashd/error", O_WRONLY | O_APPEND)) >= 0) || - ((fd = open("/dev/null", 0)) >= 0)) { + ((fd = open("/dev/null", O_WRONLY)) >= 0)) { dup2(fd, 2); close(fd); } -- 2.11.0