diff options
author | Colin Guthrie <colin@mageia.org> | 2014-07-27 21:10:43 +0100 |
---|---|---|
committer | Pascal Terjan <pterjan@gmail.com> | 2014-10-20 21:29:55 +0000 |
commit | fe0c071220db3baf4d278944969566ed19f2c31f (patch) | |
tree | b06161a2e305b411aefb5ad6717e3e13f8f47e99 | |
parent | caa29bb632d10bf29eada0a5c963ca910af59f0d (diff) | |
download | drakx-fe0c071220db3baf4d278944969566ed19f2c31f.tar drakx-fe0c071220db3baf4d278944969566ed19f2c31f.tar.gz drakx-fe0c071220db3baf4d278944969566ed19f2c31f.tar.bz2 drakx-fe0c071220db3baf4d278944969566ed19f2c31f.tar.xz drakx-fe0c071220db3baf4d278944969566ed19f2c31f.zip |
Switch uid/gid boundary to 1000+
-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); } |