[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How make my ROP for use dpkg ?



[ 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


Reply to: