summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2014-07-27 21:10:43 +0100
committerColin Guthrie <colin@mageia.org>2014-07-27 21:10:43 +0100
commitdf93dd6082bfdcc2cc46a3950a41f629adc599a2 (patch)
treeb06161a2e305b411aefb5ad6717e3e13f8f47e99
parentcaa29bb632d10bf29eada0a5c963ca910af59f0d (diff)
downloaddrakx-df93dd6082bfdcc2cc46a3950a41f629adc599a2.tar
drakx-df93dd6082bfdcc2cc46a3950a41f629adc599a2.tar.gz
drakx-df93dd6082bfdcc2cc46a3950a41f629adc599a2.tar.bz2
drakx-df93dd6082bfdcc2cc46a3950a41f629adc599a2.tar.xz
drakx-df93dd6082bfdcc2cc46a3950a41f629adc599a2.zip
Switch uid/gid boundary to 1000+
-rw-r--r--perl-install/NEWS2
-rw-r--r--perl-install/any.pm2
-rw-r--r--perl-install/fs/mount_point.pm5
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);
}