--- loncom/Attic/lcuseradd 2006/12/05 14:46:04 1.40 +++ loncom/Attic/lcuseradd 2007/03/28 20:43:37 1.41 @@ -6,7 +6,7 @@ # with adding a user with filesystem privileges (e.g. author) # # -# $Id: lcuseradd,v 1.40 2006/12/05 14:46:04 raeburn Exp $ +# $Id: lcuseradd,v 1.41 2007/03/28 20:43:37 albertel Exp $ ### ############################################################################### @@ -357,7 +357,7 @@ if (-e '/var/run/httpd.pid') { if ($pidfile) { print "lcuseradd Apache restart\n" unless $noprint; - open(PID,<$pidfile); + open(PID,"<$pidfile"); my $pid=; close(PID); $pid=~ /(\D+)/; @@ -379,6 +379,11 @@ sub enable_root_capability { } else { # root capability is already enabled } + if ($wwwid == $>) { + print("Failed to become root\n") unless $noprint; + } else { + print("Became root\n") unless $noprint; + } return $>; }