Messages in this thread | | | From | "Khimenko Victor" <> | Date | Wed, 8 Mar 2000 00:13:21 +0300 (MSK) | Subject | Re: If something is not stated in POSIX we should not bother even if 90%+ of Linux system out there using it ?? |
| |
In <20000307205104.A7464@pcep-jamie.cern.ch> Jamie Lokier (jamie.lokier@cern.ch) wrote: JL> Khimenko Victor wrote: >> Doing EXACTLY right thing without adding huge changes like fsuid to kernel. >> It was added to kernel later anyway. So IMNSHO with setfsuid we have exactly >> same situation as with setenviron/sys_setarguments : there is simple hackish >> way to do things (just allow changing of argv[0]) and there are exist more >> natural way with copla of syscalls.
JL> Agreed. Though I still can't see why changing cmdline/environ should be JL> permitted at all.
Ok. I'll say you. setproctitle(3) was just exuse :-) To me situation where you can not sanely change cmdline/environ in program but can EASILY screw /proc/PID/{cmdline,environ} always looked strange and stupid. But it worked somehow => Major programmers rule: "do not fix what's not broken". Now it does not work for some types of programs so such exuse does not work anymore. We can sanely fix it two ways: 1) Declare all programs with setproctitle(3) usage broken and make argv/environ unchangable (with page attributes). 2) Add sane way to change cmdline/environ. All other changes can be excluded from the consideration (Linus'e rule: "I prefer to have a known bug that will eventually get fixed than an ugly solution that will hide it forever"). Since setproctitle(3) was NOT invented by wu-ftpd/sendmail authors but was invented in BSD 4.3 as standard library functions and thus over time it was incorporated in ample amount of programs (not always very deep: somtimes you can just ignore calls to setproctitle and program still will be usable just fine) to me 2) looks preferrable (especially since needed changes are small). And now we only need to decide which way to change cmdline/environ is more sane. So far to me coupla of syscalls looks like most sane solution...
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |