Il 13/02/2009 00:14, Corey Hickey ha scritto: > [...] > It appears that slmodemd isn't creating /var/lib/slmodem/data.modem:1 > even though it should have permissions to create files in the directory > (isn't it still running as root at that point, anyway?). Actually, now > that I check the source, that makes sense: > > modem/modem_datafile.c:70, function datafile_load_info() > ---------------------------------------------------------------------- > int fd; > > DBG("open file: %s...\n",file_name); > fd = open(file_name, 0, 0); > if(fd < 0) { > DBG("cannot open '%s': %s\n", > file_name,strerror(errno)); > return -errno; > } > ---------------------------------------------------------------------- > > There aren't any flags on the open() system call; O_CREAT would be > needed.
The data file is actually created on the first write: modem/modem_datafile.c:110, function datafile_save_info() ---------------------------------------------------------------------- int fd; fd = open(file_name,O_CREAT|O_WRONLY,(S_IRUSR|S_IWUSR)); if(fd < 0) return -errno; [...] ---------------------------------------------------------------------- During my quick tests the file has been created the second time I tried to start slmodemd; notice that the first datafile_load_info() happens before dropping privileges: if the file is created at that time it will be root:root. > [...] Il 13/02/2009 01:11, Corey Hickey ha scritto: > [...] > In case it's of any use, I'm attaching a couple log files: > > slmodemd_2.6.26-1-686.log > slmodemd_2.6.26-1-686_no-drop-privs.log I couldn't get your logs, please send them again. Anyway, I made some tests and - since now - I couldn't reproduce this issue, at least with current 2.6.26-1 Lenny kernel. Maurizio -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org