Re: How do I add users using Python scripts on a Linux machine
[ Ivan Voras <ivoras@fer.h r]
I don't think, that the interpreter controls SUID-ness. Privileges are
always handled by the kernel. At least the kernel needs to agree, when
a normal user wants to execute a SUID scripts.
--
Freedom is always the freedom of dissenters.
(Rosa Luxemburg)
[ Ivan Voras <ivoras@fer.h r]
Sebastian 'lunar' Wiesner wrote:
>
>>
>I don't think so. From what I know, the script is passed as
>executable to the kernel loader, which interprets the shebang and
>feeds the script through the correct interpreter. So the kernel
>loader sees the script itself as executable instead of the
>interpreter binary. I've heard of other Unix systems, which handle
>this differently (meaning that the SUID bit on scripts has an
>effect), but I may be wrong.
>
Yes, the kernel parses #! but the suid-ness is still controlled by the
target interpreter (i.e. python executable). At least BSD systems also
behave this way.
>Carsten Haese <carsten@uniqsy s.comtyped
>>I don't think that that has anything to do with Linux or not. The
>>script is not the actual executable, hence its suid bit is
>>irrelevant.
>>script is not the actual executable, hence its suid bit is
>>irrelevant.
>I don't think so. From what I know, the script is passed as
>executable to the kernel loader, which interprets the shebang and
>feeds the script through the correct interpreter. So the kernel
>loader sees the script itself as executable instead of the
>interpreter binary. I've heard of other Unix systems, which handle
>this differently (meaning that the SUID bit on scripts has an
>effect), but I may be wrong.
Yes, the kernel parses #! but the suid-ness is still controlled by the
target interpreter (i.e. python executable). At least BSD systems also
behave this way.
always handled by the kernel. At least the kernel needs to agree, when
a normal user wants to execute a SUID scripts.
--
Freedom is always the freedom of dissenters.
(Rosa Luxemburg)
Comment