From 84f513b699ef533bb3276381e3ad06d4101ffc4d Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 18 Feb 2009 23:33:25 +0100 Subject: [PATCH] tests: disable suid mount test Unfortunately, libtool wrapper cannot be suid... Signed-off-by: Karel Zak --- tests/ts/mount/fstab-symlink | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/tests/ts/mount/fstab-symlink b/tests/ts/mount/fstab-symlink index 98797a7f..41e51b4a 100755 --- a/tests/ts/mount/fstab-symlink +++ b/tests/ts/mount/fstab-symlink @@ -36,6 +36,7 @@ ts_device_has "TYPE" "ext3" $DEVICE || ts_die "Cannot found ext3 on $DEVICE" $DE [ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT +rm -rf $LINKNAME ln -s $DEVICE $LINKNAME ts_fstab_add $LINKNAME $TS_MOUNTPOINT "auto" "defaults,user" @@ -45,14 +46,18 @@ $TS_CMD_MOUNT $LINKNAME 2>&1 >> $TS_OUTPUT ts_is_mounted $DEVICE || ts_die "A) Cannot found $DEVICE in /proc/mounts" $DEVICE $TS_CMD_UMOUNT $LINKNAME || ts_die "A) Cannot umount $LINKNAME" $DEVICE -# varian B) -ts_init_suid $TS_CMD_MOUNT -ts_init_suid $TS_CMD_UMOUNT +# varian B) -- disabled, the $TS_CMD_MOUNT is usually not a real program, but +# libtool wrapper and the real mount is exec()ed with +# LD_LIBRARY_PATH. This all is bad for suid programs... -su $TS_TESTUSER -c "$TS_CMD_MOUNT $LINKNAME" 2>&1 >> $TS_OUTPUT -ts_is_mounted $DEVICE || ts_die "B) Cannot found $DEVICE in /proc/mounts" $DEVICE -su $TS_TESTUSER -c "$TS_CMD_UMOUNT $LINKNAME" 2>&1 >> $TS_OUTPUT \ - || ts_die "B) Cannot umount $LINKNAME" $DEVICE +#ts_init_suid $TS_CMD_MOUNT +#ts_init_suid $TS_CMD_UMOUNT +# +#su $TS_TESTUSER -c "$TS_CMD_MOUNT -v -v -v $LINKNAME" 2>&1 >> $TS_OUTPUT +#ts_is_mounted $DEVICE +# || ts_die "B) Cannot found $DEVICE in /proc/mounts" $DEVICE +#su $TS_TESTUSER -c "$TS_CMD_UMOUNT $LINKNAME" 2>&1 >> $TS_OUTPUT \ +# || ts_die "B) Cannot umount $LINKNAME" $DEVICE ts_device_deinit $DEVICE ts_fstab_clean -- 2.39.5