# HG changeset patch # User lgb # Date 992909127 0 # Node ID 3367eba48763ac138cabd5e445d7265bd7e89973 # Parent ac1341d4a2a73f6fe6df15437c1a667b991c9618 According an idea, mplayer now can use external setuid root wrapper to do FIBMAP ioctl (requires root priv). Also, a serious bug was fixed in dvdauth.c made by some guy when mixing old and new style CSS API into dvdauth.c ;-) diff -r ac1341d4a2a7 -r 3367eba48763 fibmap_mplayer.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fibmap_mplayer.c Tue Jun 19 00:05:27 2001 +0000 @@ -0,0 +1,35 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef FIBMAP +#define FIBMAP 1 +#endif + +int main ( int argc , char ** argv ) +{ + int fd,lba=0; + if (argc!=2) { + printf("Bad usage.\n"); + return 1; + } + if ((fd = open(argv[1], O_RDONLY)) == -1) { + printf("Cannot open file %s: %s\n", + argv[1] ? argv[1] : "(NULL)", strerror(errno)); + return 1; + } + if (ioctl(fd, FIBMAP, &lba) != 0) { + printf("fibmap ioctl: %s (Hint: %s is not suid root?)\n",strerror(errno),argv[0]); + close(fd); + return 1; + } + close(fd); + printf("%d\n",lba); + return 0; +}