Mail Archives: djgpp-workers/2000/04/26/06:45:05
> Date: Tue, 25 Apr 2000 20:27:31 +0500
> From: Prashant TR <prashant_tr AT yahoo DOT com>
>
> The installation of su can be done only with superuser privileges. It uses
> chown and chmod to check this. Now, "chown root.xxx" su doesn't work.
Is chmod run *before* or *after* copying su into the destination
directory?
If it's run before the copy, it _should_ work, since you should have
both su and su.exe.
> In Unix, there is no specific extension for executables, so this works.
> However, DJGPP creates EXEs and I think it would be logical for chown and
> chmod to work on them without giving the extra .EXE extension.
>
> In short, when I say "chown root.root su", it should look for 'su' first and
> then 'su.exe' if that's not available.
This will lose in the cases where foo.exe is irrelevant.
An alternative would be to change the rule in the Makefile to use the
.exe extension explicitly. AFAIK, the case you are describing is the
only one when this is an issue, so it might as well have a specific,
rather than general, solution.
Yet another way would be to have the configure script test for the
effects of chown, and if they have no effect, not invoke it at all.
If Sh-utils is going to support DJGPP in its official distro, perhaps
this is the best alternative.
- Raw text -