Bug#464520: dvdbackup should return an error description when dvd drive is permission
This one time, at band camp, Florian Lohoff said: Hi, when running dvdbackup against a drive one has no permission on dvdbackup returns immediatly with no error report. This is kind of annoying to debug and Joe User is not really used to running programs with strace to replace error messages by common knowledge. int DVDGetTitleName(const char *device, char *title) { [...] if ( !(filehandle = open(device, O_RDONLY)) ) { fprintf(stderr, Can't open specified device %s - check your DVD device\n, device); return(1); } It should tell you that open fails. Can you give me a series of commands to reproduce this?\ Cheers, -- - | ,''`.Stephen Gran | | : :' :[EMAIL PROTECTED] | | `. `'Debian user, admin, and developer | |`- http://www.debian.org | - signature.asc Description: Digital signature
Bug#464520: dvdbackup should return an error description when dvd drive is permission
On Sun, Mar 02, 2008 at 05:41:01PM +, Stephen Gran wrote: int DVDGetTitleName(const char *device, char *title) { [...] if ( !(filehandle = open(device, O_RDONLY)) ) { fprintf(stderr, Can't open specified device %s - check your DVD device\n, device); return(1); } It should tell you that open fails. Can you give me a series of commands to reproduce this?\ [EMAIL PROTECTED]:~$ ls -la /dev/dvd lrwxrwxrwx 1 root root 3 2008-03-02 20:01 /dev/dvd - hda [EMAIL PROTECTED]:~$ ls -la /dev/hda brw--- 1 root cdrom 3, 0 2008-03-02 20:01 /dev/hda [EMAIL PROTECTED]:~$ id uid=1181(flo) gid=1181(flo) groups=20(dialout),24(cdrom),25(floppy),29(audio),44(video),46(plugdev),46(plugdev),107(netdev),1181(flo) [EMAIL PROTECTED]:~$ dvdbackup -o /tmp/dvd -i /dev/hda -M -n Test [EMAIL PROTECTED]:~$ echo $? 255 [EMAIL PROTECTED]:~$ dpkg -l dvdbackup Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) ||/ Name VersionDescription +++-==-==- ii dvdbackup 0.1.1-10 tool to rip DVD's from the command line Last lines of strace: [...] 3579 open(/etc/passwd, O_RDONLY|0x8 /* O_??? */) = 3 3579 fcntl64(3, F_GETFD) = 0x1 (flags FD_CLOEXEC) 3579 _llseek(3, 0, [0], SEEK_CUR) = 0 3579 fstat64(3, {st_mode=S_IFREG|0644, st_size=1696, ...}) = 0 3579 mmap2(NULL, 1696, PROT_READ, MAP_SHARED, 3, 0) = 0xb7f7c000 3579 _llseek(3, 1696, [1696], SEEK_SET) = 0 3579 munmap(0xb7f7c000, 1696) = 0 3579 close(3) = 0 3579 open(/dev/hda, O_RDONLY|O_LARGEFILE) = -1 EACCES (Permission denied) 3579 exit_group(-1)= ? BTW - the code is broken anyway - It should be (open ... 0) - An fd of 0 is a valid fd ... open returns -1 in case of an error. Flo -- Florian Lohoff [EMAIL PROTECTED] +49-171-2280134 Those who would give up a little freedom to get a little security shall soon have neither - Benjamin Franklin signature.asc Description: Digital signature
Bug#464520: dvdbackup should return an error description when dvd drive is permission
On Sun, Mar 02, 2008 at 05:41:01PM +, Stephen Gran wrote: int DVDGetTitleName(const char *device, char *title) { [...] if ( !(filehandle = open(device, O_RDONLY)) ) { fprintf(stderr, Can't open specified device %s - check your DVD device\n, device); return(1); } It should tell you that open fails. Can you give me a series of commands to reproduce this?\ Right in main: 2429 2430 _dvd = DVDOpen(dvd); 2431 if(!_dvd) exit(-1); 2432 I guess there is a message missing ... Flo -- Florian Lohoff [EMAIL PROTECTED] +49-171-2280134 Those who would give up a little freedom to get a little security shall soon have neither - Benjamin Franklin signature.asc Description: Digital signature
Bug#464520: dvdbackup should return an error description when dvd drive is permission
This one time, at band camp, Florian Lohoff said: On Sun, Mar 02, 2008 at 05:41:01PM +, Stephen Gran wrote: int DVDGetTitleName(const char *device, char *title) { [...] if ( !(filehandle = open(device, O_RDONLY)) ) { fprintf(stderr, Can't open specified device %s - check your DVD device\n, device); return(1); } It should tell you that open fails. Can you give me a series of commands to reproduce this?\ Right in main: 2429 2430 _dvd = DVDOpen(dvd); 2431 if(!_dvd) exit(-1); 2432 I guess there is a message missing ... Ah, missed that one. Good enough. I'll put something in there. -- - | ,''`.Stephen Gran | | : :' :[EMAIL PROTECTED] | | `. `'Debian user, admin, and developer | |`- http://www.debian.org | - signature.asc Description: Digital signature
Bug#464520: dvdbackup should return an error description when dvd drive is permission
Package: dvdbackup Version: 0.1.1-10 Severity: normal Hi, when running dvdbackup against a drive one has no permission on dvdbackup returns immediatly with no error report. This is kind of annoying to debug and Joe User is not really used to running programs with strace to replace error messages by common knowledge. Flo -- System Information: Debian Release: lenny/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'stable') Architecture: i386 (i686) Kernel: Linux 2.6.24 (SMP w/2 CPU cores; PREEMPT) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages dvdbackup depends on: ii libc6 2.7-6 GNU C Library: Shared libraries ii libdvdread3 0.9.7-3library for reading DVDs dvdbackup recommends no packages. -- no debconf information -- Florian Lohoff [EMAIL PROTECTED] +49-171-2280134 Those who would give up a little freedom to get a little security shall soon have neither - Benjamin Franklin signature.asc Description: Digital signature