Re: Setting a default location for files
Thomas Spahni <[email protected]> Wed, 12 Jan 2011 12:29:50 +0100 (CET)
| Newsgroups | gmane.mail.spam.crm114 |
|---|---|
| Message-ID | <[email protected]> |
On Tue, 11 Jan 2011, Eugene Crosser wrote: > Hi all, > > I think that the problem of the shebang line being taken as a path to > the interpreter in its entirety did exist in Linux maybe a decade ago, > or more. (A number of other potential problems is described here: > http://en.wikipedia.org/wiki/Shebang_%28Unix%29#Portability). In the > past years, constructions like > > #!/usr/bin/perl -w > > worked quite well. It still works well when there is just one argument, as in your example. What does not work is any shebang line with more than one argument, as #!/usr/bin/crm -u /path/to/somewhere > However, it's quite likely the interpreter's responsibility to parse the > command line into the arguments vector, while the kernel only selects > the part till the first whitespace to pass it to exec*(). It might be > that perl (in my example) and shell (as used most of the time) are > capable of breaking the command line into the arg vector, while crm > interpreter is not? Just a hypothesis. > > On another note, I'd suggest to *not* put crm scripts into /var. I think > the proper place for them is either /usr/lib, or even better /usr/share > (as they are architecture independent). You are completely right. My initial plan for a clean package respecting the file hierarchy standard was /etc/crm114/mailfilter.cf /etc/crm114/*.mfp /etc/profile.d/crm114.sh # adds path to the .crm programs /usr/bin/(binaries) /usr/share/crm114/*.crm /var/lib/crm114/*.css # root.users mode=664 /var/lib/crm114/reaver_cache/* # root.users mode=660 /usr/share/doc/packages/crm114/(docs) But I have not the slightest idea how this would ever work. I guess that I would have to hard-wire all these paths into the package with a lot of patches. Ideally, crm114 should run setuid as a special user with no login account. Now the package is ugly but functional. :-( Regards, Thomas ------------------------------------------------------------------------------ Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl