mirror of
https://github.com/Ponce/slackbuilds
synced 2024-12-01 01:00:03 +01:00
fb9002e634
Signed-off-by: Dave Woodfall <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
33 lines
1.3 KiB
Diff
33 lines
1.3 KiB
Diff
commit e9a545ae7f45ea2b8b031457ffeeb7ec69cac41d
|
|
Author: Andrzej Telszewski <atelszewski@gmail.com>
|
|
Date: Sat Oct 24 12:27:13 2020 +0200
|
|
|
|
Fix that the 'group' name is not correctly stored
|
|
|
|
Fix that the 'group' name is not correctly stored in '.git_store_meta'.
|
|
|
|
The reason for the error is that `getpwuid()` is used instead of
|
|
`getgrgid()` when retreiving group information.
|
|
|
|
diff --git a/git-store-meta.pl b/git-store-meta.pl
|
|
index ddc0024..c7ef50a 100755
|
|
--- a/git-store-meta.pl
|
|
+++ b/git-store-meta.pl
|
|
@@ -473,7 +473,7 @@ sub getfacl_internal {
|
|
}
|
|
if (defined $acl{'group'}) {
|
|
foreach my $gid (keys %{$acl{'group'}}) {
|
|
- my $group = getpwuid($gid);
|
|
+ my $group = getgrgid($gid);
|
|
$group = defined($group) ? $group : $gid;
|
|
push(@results, "group:$group:" . getfacl_internal_getperms(\%{$acl{'group'}{$gid}}));
|
|
}
|
|
@@ -758,7 +758,7 @@ sub get_file_metadata {
|
|
my $user = getpwuid($uid);
|
|
push(@rec, $user || "");
|
|
} elsif ($_ eq "group") {
|
|
- my $group = getpwuid($gid);
|
|
+ my $group = getgrgid($gid);
|
|
push(@rec, $group || "");
|
|
} elsif ($_ eq "acl") {
|
|
push(@rec, &$getfacl($file));
|