• How make my ROP for use dpkg ?

    From Alexander@21:1/5 to All on Mon Apr 19 09:10:01 2021
    Hi,

    I make rop (suid root) for packing to .deb my programs.
    But see system rights problems when try run dpkg.

    As resolve in Debian this problem ?

    Rop very just:

    program rop;
    uses Unix;
    begin
    if ParamCount < 1 then Halt;
    fpSystem(ParamStr(1));
    end.

    If I run rop whoami then result "root".
    If I run rop dpkg -i myprogram.deb then result rights error.

    How to provide rop with all necessary rights? Need more than set uid/gid root ?

    Good Luck,
    Alexander.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Guillem Jover@21:1/5 to Alexander on Sat Apr 24 19:20:01 2021
    On Mon, 2021-04-19 at 09:19:37 +0300, Alexander wrote:
    I make rop (suid root) for packing to .deb my programs.
    But see system rights problems when try run dpkg.

    I'm not sure what rop is? But it looks like perhaps some kind of sudo
    clone?

    As resolve in Debian this problem ?

    I don't understand the problem, so it's difficult to say.

    Rop very just:

    program rop;
    uses Unix;
    begin
    if ParamCount < 1 then Halt;
    fpSystem(ParamStr(1));
    end.

    What language is that? And why is this relevant?

    If I run rop whoami then result "root".
    If I run rop dpkg -i myprogram.deb then result rights error.

    What error?

    How to provide rop with all necessary rights? Need more than set
    uid/gid root ?

    I have no idea what this is all about to be honest. :)

    In any case if you are trying to use a sudo-like program, I'd
    recommend instead to set the Rules-Requires-Root field to no, to avoid
    needing any root privileges, and otherwise if you still need those,
    I'd recommend using fakeroot instead.

    Thanks,
    Guillem

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Guillem Jover@21:1/5 to Guillem Jover on Wed May 26 02:40:01 2021
    [ Got some clarifications off-list, replaying on list though. ]

    On Sat, 2021-04-24 at 19:14:47 +0200, Guillem Jover wrote:
    On Mon, 2021-04-19 at 09:19:37 +0300, Alexander wrote:
    I make rop (suid root) for packing to .deb my programs.
    But see system rights problems when try run dpkg.

    I'm not sure what rop is? But it looks like perhaps some kind of sudo
    clone?

    As resolve in Debian this problem ?

    I don't understand the problem, so it's difficult to say.

    I think I now understand the issue, and it does not look like a
    problem in neither dpkg nor Debian. See below.

    Rop very just:

    program rop;
    uses Unix;
    begin
    if ParamCount < 1 then Halt;
    fpSystem(ParamStr(1));
    end.

    What language is that? And why is this relevant?

    Ok, so this is the rop program, in FreePascal, I guess it's been too
    long since I programmed in TurboPascal. :)

    If I run rop whoami then result "root".

    I checked the fpSystem() documentation and that looks just like C's
    system(3) call, so if you are running «rop whoami» and it returns root
    that means you were running as user root.

    To install packages into the global root filesystem, dpkg requires root
    user privileges, neither rop nor fakeroot provide this.

    You can always install as a user into a writable sudirectory, with the
    --root and --force-chrootless options, but the package needs support for DPKG_ROOT (see https://wiki.debian.org/Teams/Dpkg/Spec/InstallBootstrap>).

    How to provide rop with all necessary rights? Need more than set
    uid/gid root ?

    See above, to install packages you need real root and the required PATH environment variable setup, or to use DPKG_ROOT.

    Regards,
    Guillem

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Florian Weimer@21:1/5 to All on Sun Oct 17 13:20:02 2021
    * Alexander:

    I make rop (suid root) for packing to .deb my programs.
    But see system rights problems when try run dpkg.

    As resolve in Debian this problem ?

    Rop very just:

    program rop;
    uses Unix;
    begin
    if ParamCount < 1 then Halt;
    fpSystem(ParamStr(1));
    end.

    If I run rop whoami then result "root".
    If I run rop dpkg -i myprogram.deb then result rights error.

    How to provide rop with all necessary rights? Need more than set
    uid/gid root ?

    I expect you need to change the real user ID to 0, using setuid. SUID
    only changes the effective user ID. whoami reports the effective user
    ID, which is why it still shows root.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)