diff options
-rw-r--r-- | perl-install/NEWS | 2 | ||||
-rw-r--r-- | perl-install/any.pm | 2 | ||||
-rw-r--r-- | perl-install/fs/mount_point.pm | 5 |
3 files changed, 7 insertions, 2 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS index 65eaf3719..32dcae4ce 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -1,3 +1,5 @@ +- switch uid/gid boundary to 1000+ + Version 16.37 - 3 July 2014 - diskdrake: diff --git a/perl-install/any.pm b/perl-install/any.pm index 80962f0ff..c7214ac34 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -836,7 +836,7 @@ sub ask_user_and_root { my $id = $u->{$field} or return 'ok'; my $name = $field eq 'uid' ? N("User ID") : N("Group ID"); $id =~ /^\d+$/ or $in->ask_warn('', N("%s must be a number", $name)), return; - $id >= 500 or $in->ask_yesorno('', N("%s should be above 500. Accept anyway?", $name)) or return; + $id >= 1000 or $in->ask_yesorno('', N("%s should be above 1000. Accept anyway?", $name)) or return; 'ok'; }; my $ret = $in->ask_from_( 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); } |