Kris Kvilekval
2007-Nov-14 23:38 UTC
Bug#451321: adduser: deluser should not rewrite backup files
Package: adduser Version: 3.105 Severity: minor Tags: patch The original backup code in deluser first writes the tar file, and then compresses it. This patch simply uses some gnu tar options (already required) to accomplish the same. This is useful when backup up over NFS. *** deluser.orig 2007-11-14 15:29:19.000000000 -0800 --- deluser 2007-11-14 15:29:27.000000000 -0800 *************** *** 300,317 **** print $filesfile join("\n",@files); $filesfile->close(); my $tar = &which(''tar''); ! &systemcall($tar, "-cf", $backup_name, "--files-from", $filesfilename); ! chmod 0600, $backup_name; ! my $rootid = 0; ! chown $rootid, $rootid, $backup_name; ! unlink($filesfilename); my $bzip2 = &which(''bzip2'', 1); my $gzip = &which(''gzip'', 1); if($bzip2) { ! systemcall($bzip2, $backup_name); } elsif($gzip) { ! systemcall($gzip, "--best", $backup_name); } } if(@files || @dirs) { --- 300,322 ---- print $filesfile join("\n",@files); $filesfile->close(); my $tar = &which(''tar''); ! ! my $ext = ""; ! my $options = ""; my $bzip2 = &which(''bzip2'', 1); my $gzip = &which(''gzip'', 1); if($bzip2) { ! $options .= "--bzip2"; ! $ext = ".bz2"; } elsif($gzip) { ! $options .= "--gzip"; ! $ext = ".gz"; } + &systemcall($tar, "-c" , $options, "-f", $backup_name.$ext, "--files-from", $filesfilename); + chmod 600, $backup_name; + my $rootid = 0; + chown $rootid, $rootid, $backup_name.$ext; + unlink($filesfilename); } if(@files || @dirs) { -- System Information: Debian Release: 4.0 APT prefers stable APT policy: (990, ''stable''), (500, ''unstable'') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.18-5-686 Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1) Versions of packages adduser depends on: ii debconf [debconf-2.0] 1.5.11 Debian configuration management sy ii passwd 1:4.0.18.1-7 change and administer password and ii perl-base 5.8.8-7 The Pathologically Eclectic Rubbis adduser recommends no packages. -- debconf information: * adduser/homedir-permission: true
Stephen Gran
2007-Nov-15 01:18 UTC
[Adduser-devel] Bug#451321: Bug#451321: adduser: deluser should not rewrite backup files
This one time, at band camp, Kris Kvilekval said:> > The original backup code in deluser first writes the tar file, and then compresses it. > This patch simply uses some gnu tar options (already required) to accomplish > the same. This is useful when backup up over NFS. > if($bzip2) { > ! $options .= "--bzip2"; > ! $ext = ".bz2"; > } elsif($gzip) { > ! $options .= "--gzip"; > ! $ext = ".gz"; > } > + &systemcall($tar, "-c" , $options, "-f", $backup_name.$ext, "--files-from", $filesfilename);This will leave a file named ''$backup.tar.'' in the case that both of those compressors are missing, I think. Otherwise, it seems reasonable. I''ll look at merging it in shortly. Thanks for the report, -- ----------------------------------------------------------------- | ,''''`. Stephen Gran | | : :'' : sgran at debian.org | | `. `'' Debian user, admin, and developer | | `- http://www.debian.org | ----------------------------------------------------------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : http://lists.alioth.debian.org/pipermail/adduser-devel/attachments/20071115/5aaf1af3/attachment.pgp
Debian Bug Tracking System
2008-Mar-02 17:33 UTC
[Adduser-devel] Bug#451321: marked as done (adduser: deluser should not rewrite backup files)
Your message dated Sun, 02 Mar 2008 17:17:03 +0000 with message-id <E1JVro7-00058Y-3R at ries.debian.org> and subject line Bug#451321: fixed in adduser 3.106 has caused the Debian Bug report #451321, regarding adduser: deluser should not rewrite backup files to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner at bugs.debian.org immediately.) -- 451321: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=451321 Debian Bug Tracking System Contact owner at bugs.debian.org with problems -------------- next part -------------- An embedded message was scrubbed... From: Kris Kvilekval <kris at cs.ucsb.edu> Subject: adduser: deluser should not rewrite backup files Date: Wed, 14 Nov 2007 15:38:09 -0800 Size: 3556 Url: http://lists.alioth.debian.org/pipermail/adduser-devel/attachments/20080302/005616f2/attachment.eml -------------- next part -------------- An embedded message was scrubbed... From: Stephen Gran <sgran at debian.org> Subject: Bug#451321: fixed in adduser 3.106 Date: Sun, 02 Mar 2008 17:17:03 +0000 Size: 4378 Url: http://lists.alioth.debian.org/pipermail/adduser-devel/attachments/20080302/005616f2/attachment-0001.eml