Browse Source

This changes real uid id to effective uid id.

master
freesource 23 years ago
parent
commit
cfa9689f91
  1. 4
      BootRoot/Yard.pm
  2. 19
      gbootroot

4
BootRoot/Yard.pm

@ -1097,7 +1097,7 @@ sub copy_strip_file {
## non-root users will experience problems here so this is
## skipped. --freesource
if ( $< == 0 ) {
if ( $> == 0 ) {
my($mode, $uid, $gid);
(undef, undef, $mode, undef, $uid, $gid) = stat $from;
my $from_base = basename($from);
@ -1589,7 +1589,7 @@ sub mount_device {
$options = "";
}
if ( $< == 0 ) {
if ( $> == 0 ) {
errmk(sys("mount $options -t ext2 $device $mount_point"));
}
else {

19
gbootroot

@ -528,13 +528,22 @@ if ( $< == 0 ) {
}
else {
# Hopefully only one user at a time.
if (!-d "$tmp1/gboot_non_root") {
$tmp = "$tmp1/gboot_non_root" if err_custom_perl(
"mkdir $tmp1/gboot_non_root",
# The Administrator just needs to add a line like this to the fstab for
# each non-root user who wants to be able to create root_fs.
# Ofcourse the user is locked into the ext2 fs in this example
#
# /tmp/gboot_non_root_`id -u`/root_fs \
# /tmp/gboot_non_root_`id -u`/loopback \
# ext2 defaults,noauto,user,loop 0 0
my $user = $>;
if (!-d "$tmp1/gboot_non_root_" . $user) {
$tmp = "$tmp1/gboot_non_root" . $user if err_custom_perl(
"mkdir $tmp1/gboot_non_root" . $user,
"gBootRoot: ERROR: Could not make temporary directory") != 2;
}
$tmp = "$tmp1/gboot_non_root";
$tmp = "$tmp1/gboot_non_root" . $user;
if (!-d "$tmp1/gbootroot_mnt$time") {
$mnt = "$tmp1/gbootroot_mnt$time" if err_custom_perl(

Loading…
Cancel
Save