I'm working on the 4.1.0 release for Fedora and I've been working through
all the patches I inherited, most of which aren't necessary anymore.

Here's one that I'm not sure what effect it actually has:

$ cat rpmbuild/BackupPC/SOURCES/BackupPC-4.0.0-fix-shadow-access.patch
--- a/lib/BackupPC/CGI/Lib.pm
+++ b/lib/BackupPC/CGI/Lib.pm
@@ -143,7 +143,7 @@ sub NewRequest
     # Verify we are running as the correct user
     #
     if ( $Conf{BackupPCUserVerify}
-           && $> != (my $uid = (getpwnam($Conf{BackupPCUser}))[2]) ) {
+           && $> != (my $uid = (getpwnam($Conf{BackupPCUser}))) ) {
        ErrorExit(eval("qq{$Lang->{Wrong_user__my_userid_is___}}"), <<EOF);
 This script needs to run as the user specified in \$Conf{BackupPCUser},
 which is set to $Conf{BackupPCUser}.
--- a/lib/BackupPC/Lib.pm
+++ b/lib/BackupPC/Lib.pm
@@ -127,7 +127,7 @@ sub new
     #
     if ( !$noUserCheck
            && $bpc->{Conf}{BackupPCUserVerify}
-           && $> != (my $uid = (getpwnam($bpc->{Conf}{BackupPCUser}))[2])
) {
+           && $> != (my $uid = (getpwnam($bpc->{Conf}{BackupPCUser}))) ) {
        print(STDERR "$0: Wrong user: my userid is $>, instead of $uid"
            . " ($bpc->{Conf}{BackupPCUser})\n");
        print(STDERR "Please su $bpc->{Conf}{BackupPCUser} first\n");

What's the effect of removing the [2] from these?

Thanks,
Richard
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
BackupPC-devel mailing list
BackupPC-devel@lists.sourceforge.net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-devel
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

Reply via email to