Bug#453383: hibernate: scriptlets should be executable

2008-03-31 Thread martin f krafft
also sprach Pascal A. Dupuis [EMAIL PROTECTED] [2008.03.31.2223 +0200]:
 Another flaw is that ANY junk landing some way or other into the
 scriptlets directory means either a failure, either running hibernate
 for purposes it is not supposed to.

How should junk land there?

Please keep the bug in the record...

-- 
 .''`.   martin f. krafft [EMAIL PROTECTED]
: :'  :  proud Debian developer, author, administrator, and user
`. `'`   http://people.debian.org/~madduck - http://debiansystem.info
  `-  Debian - when you have better things to do than fixing systems
 
i have made good judgments in the past.
 i have made good judgments in the future. 
  - george w. bush


digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/)


Bug#453383: hibernate: scriptlets should be executable

2008-03-30 Thread martin f krafft
tags 453383 wontfix
thanks

also sprach Pascal A. Dupuis [EMAIL PROTECTED] [2007.11.29.1011 +0100]:
 in prevision of a backupt/restore, I populated each dir with a md5sum of 
 the content, contained locally in a file 'md5sum.md5'. After that, 
 hibernate stopped working, and the culprit was that it was trying to 
 execute this new file. The fix is easy:
 1) change each scriptlet mode to rwxr--r-- 
 2) apply the enclosed patch to /usr/sbin/hibernate: scriptlets are 
 executed only if they are executable
 The added bonus is that you can add data or README files in the 
 scriptlet dir, without perturbing the working of the command.

I don't think this is the proper solution as these scriptlets are
*not* executable and should thus not be marked as such.

I don't see why this should be fixed. Your backup approach is flawed
in my eyes, as you are not supposed to be installing files into
directories in /usr. I suggest you store the md5sums in /var/lib or
/var/cache and encode the directory path in the name. /usr is often
mounted read-only.

-- 
 .''`.   martin f. krafft [EMAIL PROTECTED]
: :'  :  proud Debian developer, author, administrator, and user
`. `'`   http://people.debian.org/~madduck - http://debiansystem.info
  `-  Debian - when you have better things to do than fixing systems
 
time wounds all heels.
   -- groucho marx


digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/)


Bug#453383: hibernate: scriptlets should be executable

2007-11-29 Thread Pascal A. Dupuis
Package: hibernate
Severity: wishlist
Tags: patch

Hello,
in prevision of a backupt/restore, I populated each dir with a md5sum of 
the content, contained locally in a file 'md5sum.md5'. After that, 
hibernate stopped working, and the culprit was that it was trying to 
execute this new file. The fix is easy:
1) change each scriptlet mode to rwxr--r-- 
2) apply the enclosed patch to /usr/sbin/hibernate: scriptlets are 
executed only if they are executable
The added bonus is that you can add data or README files in the 
scriptlet dir, without perturbing the working of the command.

Best regards

Pascal Dupuis

-- Package-specific info:
--- configuration
== /etc/hibernate/common.conf ==
Verbosity 0
LogFile /var/log/hibernate.log
LogVerbosity 1
Distribution debian
SaveClock restore-only
 ChangeGrubMenu yes
 GrubMenuFile /boot/grub/menu.lst
 AlternateGrubMenuFile /boot/grub/menu-suspended.lst
 BackupGrubMenuFile /var/backups/grub.conf.hibernate
UnloadBlacklistedModules yes
LoadModules auto
SwitchToTextMode yes
== /etc/hibernate/disk.conf ==
TryMethod ususpend-disk.conf
TryMethod sysfs-disk.conf
== /etc/hibernate/hibernate.conf ==
FullSpeedCPU on
TryMethod suspend2.conf
TryMethod disk.conf
TryMethod ram.conf
DownInterfaces wlan0
UnloadModules rt2500
UnmountFSTypes vfat smbfs nfs autofs fuse
RestartServices laptop-net
Mount /dos/C
== /etc/hibernate/ram.conf ==
TryMethod ususpend-ram.conf
TryMethod sysfs-ram.conf
== /etc/hibernate/suspend2.conf ==
UseSuspend2 yes
Reboot no
EnableEscape yes
DefaultConsoleLevel 1
Compressor lzf
Encryptor none
FullSpeedCPU yes
Include common.conf
== /etc/hibernate/sysfs-disk.conf ==
UseSysfsPowerState disk
Include common.conf
== /etc/hibernate/sysfs-ram.conf ==
UseSysfsPowerState mem
Include common.conf
== /etc/hibernate/ususpend-both.conf ==
USuspendMethod both
Include common.conf
== /etc/hibernate/ususpend-disk.conf ==
USuspendMethod disk
Include common.conf
== /etc/hibernate/ususpend-ram.conf ==
USuspendMethod ram
Include common.conf

--- /sys/power
== /sys/power/disk ==
[platform] test testproc shutdown reboot 
== /sys/power/image_size ==
524288000
== /sys/power/resume ==
3:8
== /sys/power/state ==
mem disk

--- log
hibernate.log file not readable.

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.23.9
Locale: LANG=fr_BE, LC_CTYPE=fr_BE (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash
--- hibernate.orig  2007-11-29 09:59:43.0 +0100
+++ hibernate   2007-11-29 10:02:15.0 +0100
@@ -552,6 +552,9 @@
# Avoid editor backup files.
case $scriptlet in *~|*.bak) continue ;; esac
 
+   # only use executable files
+   [ -x $scriptlet ] || continue
+
# Don't source a scriptlet by name more than once.
scriptlet_name=${scriptlet##*/}