summaryrefslogtreecommitdiffstats
path: root/perl-install/fs/mount_point.pm
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2014-07-27 21:10:43 +0100
committerPascal Terjan <pterjan@gmail.com>2014-10-20 21:29:55 +0000
commitfe0c071220db3baf4d278944969566ed19f2c31f (patch)
treeb06161a2e305b411aefb5ad6717e3e13f8f47e99 /perl-install/fs/mount_point.pm
parentcaa29bb632d10bf29eada0a5c963ca910af59f0d (diff)
downloaddrakx-fe0c071220db3baf4d278944969566ed19f2c31f.tar
drakx-fe0c071220db3baf4d278944969566ed19f2c31f.tar.gz
drakx-fe0c071220db3baf4d278944969566ed19f2c31f.tar.bz2
drakx-fe0c071220db3baf4d278944969566ed19f2c31f.tar.xz
drakx-fe0c071220db3baf4d278944969566ed19f2c31f.zip
Switch uid/gid boundary to 1000+
Diffstat (limited to 'perl-install/fs/mount_point.pm')
-rw-r--r--perl-install/fs/mount_point.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/perl-install/fs/mount_point.pm b/perl-install/fs/mount_point.pm
index 7918ea08f..e56c330c0 100644
--- a/perl-install/fs/mount_point.pm
+++ b/perl-install/fs/mount_point.pm
@@ -24,7 +24,10 @@ sub guess_mount_point {
my $d = $handle->{dir};
my $mnt = find { -e "$d/$l{$_}" } keys %l;
$mnt ||= (stat("$d/.bashrc"))[4] ? '/root' : '/home/user' . ++$$user if -e "$d/.bashrc";
- $mnt ||= (any { -d $_ && (stat($_))[4] >= 500 && -e "$_/.bashrc" } glob_($d)) ? '/home' : '';
+ $mnt ||= (any { -d $_ && (stat($_))[4] >= 1000 && -e "$_/.bashrc" } glob_($d)) ? '/home' : '';
+ # Keep uid 500 here for guesswork, but base it on .bash_history to increase
+ # changes it's a real user.
+ $mnt ||= (any { -d $_ && (stat($_))[4] >= 500 && -e "$_/.bash_history" } glob_($d)) ? '/home' : '';
($mnt, $handle);
}