Debian bug report logs - #1544, boring messages


Message sent to debian-devel@pixar.com:


Subject: Bug#1544: usergroups in adduser
Reply-To: Ian Murdock <imurdock@debian.org>, debian-bugs@pixar.com
Resent-From: Ian Murdock <imurdock@debian.org>
Resent-To: debian-devel@pixar.com
Resent-Date: Wed, 04 Oct 1995 13:33:07 GMT
Resent-Message-ID: <debian-bugs-handler.1544.B10041330210@pixar.com>
Resent-Sender: iwj10@cus.cam.ac.uk
X-Debian-PR-Package: adduser
X-Debian-PR-Keywords: 
Received: via spool for debian-bugs; Wed, 04 Oct 1995 13:33:07 GMT
Received: with rfc822 via encapsulated-mail; Wed, 04 Oct 1995 13:30:19 GMT
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0t0TsN-0005zZC; Wed, 4 Oct 95 06:28 PDT
Received: from imagine.imaginit.com by pixar.com with SMTP id AA29786
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Wed, 4 Oct 1995 06:28:25 -0700
Received: by imagine.imaginit.com
	id <m0t0Tw1-0001dbC@imagine.imaginit.com>
	(Debian /\oo/\ Smail3.1.29.1 #29.33); Wed, 4 Oct 95 08:32 EST
Message-Id: <m0t0Tw1-0001dbC@imagine.imaginit.com>
Date: Wed, 4 Oct 95 08:32 EST
From: Ian Murdock <imurdock@debian.org>
To: debian-bugs@pixar.com

Package: adduser
Version: 1.94-1

Users added when using usergroups should have home directories with
mode 2775, and all skeletal files should be g+w.  This is how it is
currently created:

$ ls -la /mnt/home/imurdock
total 4
drwxr-xr-x   2 imurdock imurdock     1024 Oct  3 23:14 .
drwxrwsr-x   3 root     staff        1024 Oct  3 23:14 ..
-rw-r--r--   1 imurdock imurdock      133 Oct  3 23:14 .bash_profile
-rw-r--r--   1 imurdock imurdock      114 Oct  3 23:14 .bashrc


Message sent:


From: iwj10@thor.cam.ac.uk (Ian Jackson)
To: Ian Murdock <imurdock@debian.org>
Subject: Bug#1544: Acknowledgement (was: usergroups in adduser)
In-Reply-To: <m0t0Tw1-0001dbC@imagine.imaginit.com>
References: <m0t0Tw1-0001dbC@imagine.imaginit.com>

Thank you for the problem report you have sent regarding Debian GNU/Linux.
This is an automatically generated reply, to let you know your message has
been received.  It is being forwarded to the developers' mailing list for
their attention; they will reply in due course.

If you wish to submit further information on your problem, please send
it to debian-bugs@pixar.com, but please ensure that the Subject
line of your message starts with "Bug#1544" or "Re: Bug#1544" so that
we can identify it as relating to the same problem.

Please do not reply to the address at the top of this message,
unless you wish to report a problem with the bug-tracking system.

Ian Jackson
(maintainer, debian-bugs)


Message sent to debian-devel@pixar.com:


Subject: Bug#1544: usergroups in adduser
Reply-To: Ian Jackson <iwj10@cus.cam.ac.uk>, debian-bugs@pixar.com
Resent-From: Ian Jackson <iwj10@cus.cam.ac.uk>
Resent-To: debian-devel@pixar.com
Resent-Date: Thu, 05 Oct 1995 00:33:03 GMT
Resent-Message-ID: <debian-bugs-handler.1544.B10050028260@pixar.com>
Resent-Sender: iwj10@cus.cam.ac.uk
X-Debian-PR-Package: adduser
X-Debian-PR-Keywords: 
Received: via spool for debian-bugs; Thu, 05 Oct 1995 00:33:03 GMT
Received: with rfc822 via encapsulated-mail; Thu, 05 Oct 1995 00:28:26 GMT
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0t0e94-0008ozC; Wed, 4 Oct 95 17:26 PDT
Received: from bootes.cus.cam.ac.uk by pixar.com with SMTP id AA08118
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Wed, 4 Oct 1995 17:24:46 -0700
Received: by bootes.cus.cam.ac.uk
	(Smail-3.1.29.0 #36) id m0t0dMX-000BzZC; Thu, 5 Oct 95 00:36 BST
Received: by chiark
	id <m0t0d5j-0002aGZ@chiark.al.cl.cam.ac.uk>
	(Debian /\oo/\ Smail3.1.29.1 #29.33); Thu, 5 Oct 95 00:19 BST
Message-Id: <m0t0d5j-0002aGZ@chiark.al.cl.cam.ac.uk>
Date: Thu, 5 Oct 95 00:19 BST
From: Ian Jackson <iwj10@cus.cam.ac.uk>
To: debian-bugs@pixar.com

Ian Murdock writes ("Bug#1544: usergroups in adduser"):
> Package: adduser
> Version: 1.94-1
>
> Users added when using usergroups should have home directories with
> mode 2775, and all skeletal files should be g+w.  This is how it is
> currently created:
>
> $ ls -la /mnt/home/imurdock
> total 4
> drwxr-xr-x   2 imurdock imurdock     1024 Oct  3 23:14 .
> drwxrwsr-x   3 root     staff        1024 Oct  3 23:14 ..
> -rw-r--r--   1 imurdock imurdock      133 Oct  3 23:14 .bash_profile
> -rw-r--r--   1 imurdock imurdock      114 Oct  3 23:14 .bashrc

This is because it uses the umask (presumably your root umask is 022 -
mine is 002).

Here is yet another version of my patch to adduser.

This one incorporates all of my previous changes, and fixes a few
other problems too:
 * honour --home when creating non-system users
 * create home directory with setgid bit when using usergroups.
 * copy permissions of dotfiles from /etc/skel, but modified so that
   the group permissions are the same as the user permissions
   (usergroups) or as the other permissions (not user- groups).
 * run /usr/local/sbin/adduser.local if it exists.
 * don't break the dotfiles permissions while doing the umask
   modification.

Ian.

--- /usr/sbin/adduser	Mon Jul 10 02:10:53 1995
+++ /usr/local/sbin/adduser	Wed Oct  4 21:50:45 1995
@@ -602,7 +602,11 @@
     ## add the new user to the passwd file
     ##
     print "Updating password file... " if ($verbose);
-    $home_dir = $config{"home"} . "/" . $new_name;
+    if ($special_home) {
+	$home_dir = $special_home;
+    } else {
+	$home_dir = $config{"home"} . "/" . $new_name;
+    }
     &add_user_to_file($new_name,
 		      $new_uid,
 		      $new_gid,
@@ -651,6 +655,7 @@
 	}
 	mkdir ($home_dir, $dir_mode);
 	chown ($new_uid, $new_gid, $home_dir);
+        chmod ($dir_mode, $home_dir);
 	print "done.\n" if ($verbose);

 	##
@@ -666,19 +671,25 @@
 	## change umask lines in appropriate skel files
 	## if we're using usergroups.
 	##
+        local (@statreturn);
 	if ($config{"usergroups"} eq "yes") {
 	    foreach $file (".login", ".profile", ".bash_profile") {
 		$this_file = $home_dir . "/" . $file;
 		if (-f $this_file) {
 		    open (FILE, "$this_file") || die "open: $!";
-		    open (NEWFILE, ">$file.new") || die "open: $!";
+		    open (NEWFILE, ">$this_file.new") || die "open: $!";
 		    while ($line = <FILE>) {
 			$line =~ s/umask 0([267])\1/umask 00$1/;
-			print NEWFILE $line;
+			print(NEWFILE $line) || die "write: $!";
 		    }
+
+                    (@statreturn= stat(FILE)) || die "fstat: $!";
+                    $filemode= $statreturn[2];
+                    chmod($statreturn[2],"$this_file.new") || die "chmod: $!";
+
 		    close FILE;
-		    close NEWFILE;
-		    rename ("$file.new", "$file") || die "rename: $!";
+		    close(NEWFILE) || die "close: $!";
+		    rename ("$this_file.new", "$this_file") || die "rename: $!";
 		}
 	    }
 	}
@@ -719,6 +730,11 @@
     }
     print "done.\n";
     &clean_up();
+    if (-f "/usr/local/sbin/adduser.local") {
+        exec("/usr/local/sbin/adduser.local",
+             $new_name, $new_uid, $new_gid, $home_dir);
+        die "exec adduser.local: $!";
+    }
     exit 0;
 }

@@ -867,11 +883,21 @@
     open (NEWFILE, ">$dir/$file") || die "open: $!";

     while (<FILE>) {
-	print NEWFILE;
+	print(NEWFILE) || die "print: $!";
     }

+    local (@statreturn,$filemode);
+    (@statreturn= stat(FILE)) || die "fstat: $!";
+    $filemode= $statreturn[2];
+    if ($config{"usergroups"} eq "yes") {
+        $filemode= ($filemode & 0707) | (($filemode & 0700)>>3);
+    } else {
+        $filemode= ($filemode & 0707) | (($filemode & 0007)<<3);
+    }
+    chmod($filemode,"$dir/$file") || die "chmod: $!";
+
     close FILE;
-    close NEWFILE;
+    close(NEWFILE) || die "close: $!";

     return 1;
 }
@@ -1246,7 +1272,3 @@
     print STDERR "  --debug         Display plenty of debugging information.\n";
     print STDERR "Global configuration is in the file '/etc/adduser.conf'\n";
 }
-
-
-
-


Message sent:


From: iwj10@thor.cam.ac.uk (Ian Jackson)
To: Ian Jackson <iwj10@cus.cam.ac.uk>
Subject: Bug#1544: Info received (was Bug#1544: usergroups in adduser)
In-Reply-To: <m0t0d5j-0002aGZ@chiark.al.cl.cam.ac.uk>
References: <m0t0d5j-0002aGZ@chiark.al.cl.cam.ac.uk>

Thank you for the additional information you have supplied regarding
this problem report.  It has been forwarded to the developers to
accompany the original report.

If you wish to continue to submit further information on your problem,
please do the same thing again: send it to debian-bugs@pixar.com, ensuring
that the Subject line starts with "Bug#1544" or "Re: Bug#1544" so that
we can identify it as relating to the same problem.

Please do not reply to the address at the top of this message,
unless you wish to report a problem with the bug-tracking system.

Ian Jackson
(maintainer, debian-bugs)


Message sent:


From: iwj10@thor.cam.ac.uk (Ian Jackson)
To: sr1@irz301.inf.tu-dresden.de (Sven Rudolph)
In-Reply-To: <199510231452.PAA14465@irz101.inf.tu-dresden.de>
References: <199510231452.PAA14465@irz101.inf.tu-dresden.de> <m0t0Tw1-0001dbC@imagine.imaginit.com>
Subject: Bug#1544: marked as done (was: usergroups in adduser)

Your message dated Mon, 23 Oct 1995 15:52:58 +0100
with message-id <199510231452.PAA14465@irz101.inf.tu-dresden.de>
and subject line Bug#1544: usergroups in adduser
has caused the attached bug report to be marked as done.

It is your now responsibility to ensure that the bug report is dealt
with.

(NB: If you are a system administrator and have no idea what I'm
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Ian Jackson
(maintainer, debian-bugs)

Received: with rfc822 via encapsulated-mail; Wed, 04 Oct 1995 13:30:19 GMT
From debian.org!imurdock Wed Oct  4 06:28:47 1995
Return-Path: <imurdock@debian.org>
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0t0TsN-0005zZC; Wed, 4 Oct 95 06:28 PDT
Received: from imagine.imaginit.com by pixar.com with SMTP id AA29786
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Wed, 4 Oct 1995 06:28:25 -0700
Received: by imagine.imaginit.com
	id <m0t0Tw1-0001dbC@imagine.imaginit.com>
	(Debian /\oo/\ Smail3.1.29.1 #29.33); Wed, 4 Oct 95 08:32 EST
Message-Id: <m0t0Tw1-0001dbC@imagine.imaginit.com>
Date: Wed, 4 Oct 95 08:32 EST
From: Ian Murdock <imurdock@debian.org>
To: debian-bugs@pixar.com
Subject: usergroups in adduser

Package: adduser
Version: 1.94-1

Users added when using usergroups should have home directories with
mode 2775, and all skeletal files should be g+w.  This is how it is
currently created:

$ ls -la /mnt/home/imurdock
total 4
drwxr-xr-x   2 imurdock imurdock     1024 Oct  3 23:14 .
drwxrwsr-x   3 root     staff        1024 Oct  3 23:14 ..
-rw-r--r--   1 imurdock imurdock      133 Oct  3 23:14 .bash_profile
-rw-r--r--   1 imurdock imurdock      114 Oct  3 23:14 .bashrc


Message sent:


From: iwj10@thor.cam.ac.uk (Ian Jackson)
To: Ian Murdock <imurdock@debian.org>
Subject: Bug#1544 acknowledged by developer (was: usergroups in adduser)
References: <199510231452.PAA14465@irz101.inf.tu-dresden.de> <m0t0Tw1-0001dbC@imagine.imaginit.com>
In-Reply-To: <m0t0Tw1-0001dbC@imagine.imaginit.com>

This is an automatic notification regarding your bug report.

Responsibility for it has been taken by one of the developers, namely
sr1@irz301.inf.tu-dresden.de (Sven Rudolph).

You should be hearing from them with a substantive response shortly, if
you have not already done so.  If not, please contact them directly,
or email debian-bugs@pixar.com or myself.

Ian Jackson
(maintainer, debian-bugs)


Ian Jackson / iwj10@thor.cam.ac.uk, with the debian-bugs tracking mechanism
This page last modified 07:43:01 GMT Wed 01 Nov