On Thu, 21 Sep 2006, dwelch91 wrote: > I would be happy to address this further if I can get a better idea of what > your solution is. I did make some changes in 1.6.9 to address this, and am > sorry if it is still not adequate. If you could send a patch or diff file(s) > so that I can fully see your solution, I will give it another look.
As a rule of thumb, all well-behaved Unix programs: 1. Only change umask when creating files that are security-sensitive (like, e.g. hpiod and hpssd files, print and fax jobs, temp files); and this is just a safety net for when the program fails to do what is right and create the files with strict permissions without the need of the umask. and 2. Always respect user umask() for all normal files it creates for normal user comsumption. This means you create files with modes 777 (for exec or directories) or mode 666 (data files), and let the user umask (usually 0022 or 0002) take care of removing the unwanted permissions. Right now, it appears only hp-unload creates files for general comsumption, as the other utilities create jobs, logs, etc. Should be simply a matter of dropping the os.umask call in unload.py, and leaving the other os.umask calls in the rest of the utilities alone. However, if unload.py creates files for some other reason, then it will have to save the current umask, switch to 077, and switch back to the saved one (or doing a chmod() to create the same effect) for writing unloaded files. -- "One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ HPLIP-Devel mailing list HPLIP-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hplip-devel