Debian bug report logs - #1534 , boring messages ----------------------------------------------------------------------- Message sent to debian-devel@pixar.com: Subject: Bug#1534: adduser problems with home directories Reply-To: Ian Jackson , debian-bugs@pixar.com Resent-From: Ian Jackson Resent-To: debian-devel@pixar.com Resent-Date: Tue, 03 Oct 1995 13:18:02 GMT Resent-Message-ID: Resent-Sender: iwj10@cus.cam.ac.uk X-Debian-PR-Package: adduser X-Debian-PR-Keywords: Received: via spool for debian-bugs; Tue, 03 Oct 1995 13:18:02 GMT Received: with rfc822 via encapsulated-mail; Tue, 03 Oct 1995 13:16:21 GMT Received: from pixar.com by mongo.pixar.com with smtp (Smail3.1.28.1 #15) id m0t07AC-000GAEC; Tue, 3 Oct 95 06:13 PDT Received: from bootes.cus.cam.ac.uk by pixar.com with SMTP id AA19630 (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Tue, 3 Oct 1995 06:13:20 -0700 Received: by bootes.cus.cam.ac.uk (Smail-3.1.29.0 #36) id m0t06p6-000C0aC; Tue, 3 Oct 95 13:51 BST Received: by chiark id (Debian /\oo/\ Smail3.1.29.1 #29.33); Tue, 3 Oct 95 13:50 BST Message-Id: Date: Tue, 3 Oct 95 13:50 BST From: Ian Jackson To: Debian bugs submission address Package: adduser Version: 1.94-1 Firstly, it doesn't honour the --home option except when creating `system' users. This is clearly silly. If I say adduser --home /u2/fred fred then I want fred's home directory to be /u2/fred. Secondly, it doesn't set the setgid bit on home directories that it creates (when usergroups is enabled - clearly when it's disabled it shouldn't do it). Thirdly, I notice it makes many system calls without checking the error returns. Below is a patch that solves the first two problems. I have not bothered to produce a patch for the manpage (which says that the --home option only works with --system). Fixing the third problem will be quite a lot of work. Ian. --- adduser Tue Oct 3 03:23:52 1995 +++ /usr/local/sbin/adduser Tue Oct 3 13:39:53 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); ## ----------------------------------------------------------------------- Message sent: From: iwj10@thor.cam.ac.uk (Ian Jackson) To: Ian Jackson Subject: Bug#1534: Acknowledgement (was: adduser problems with home directories) In-Reply-To: References: 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#1534" or "Re: Bug#1534" 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) ----------------------------------------------------------------------- Ian Jackson / iwj10@thor.cam.ac.uk , with the debian-bugs tracking mechanism This page last modified 07:43:01 GMT Wed 01 Nov