[LON-CAPA-cvs] cvs: loncom / lcuseradd
foxr
lon-capa-cvs@mail.lon-capa.org
Tue, 21 Jun 2005 10:58:39 -0000
foxr Tue Jun 21 06:58:39 2005 EDT
Modified files:
/loncom lcuseradd
Log:
Cosmetic changes to ensure that:
- status file is written while euid is www.
- There's a newline after the status code.
Index: loncom/lcuseradd
diff -u loncom/lcuseradd:1.36 loncom/lcuseradd:1.37
--- loncom/lcuseradd:1.36 Thu Apr 7 18:27:52 2005
+++ loncom/lcuseradd Tue Jun 21 06:58:38 2005
@@ -6,7 +6,7 @@
# with adding a user with filesystem privileges (e.g. author)
#
#
-# $Id: lcuseradd,v 1.36 2005/04/07 22:27:52 albertel Exp $
+# $Id: lcuseradd,v 1.37 2005/06/21 10:58:38 foxr Exp $
###
###############################################################################
@@ -249,7 +249,7 @@
if ($status) {
print "Error. Something went wrong with the addition of user ".
"\"$safeusername\".\n" unless $noprint;
- print "Final status of useradd = $status";
+ print "Final status of useradd = $status\n";
unlink('/tmp/lock_lcpasswd');
&Exit(12);
}
@@ -480,6 +480,10 @@
sub Exit {
my ($code) = @_; # Status code.
+ # TODO: Ensure the error file is owned/deletable by www:www:
+
+ &disable_root_capability(); # We run unprivileged to write the error file.
+
print "Exiting with status $code error file is $error_file\n" unless $noprint;
if($error_file) {
open(FH, ">$error_file");