From fe0c071220db3baf4d278944969566ed19f2c31f Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Sun, 27 Jul 2014 21:10:43 +0100 Subject: Switch uid/gid boundary to 1000+ --- perl-install/fs/mount_point.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'perl-install/fs') 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); } -- cgit v1.2.1