I'm going to try to clear this up a little.
First of all, the strange uid and gid numbers that I see are a problem
with the RPM itself, not with the post-install script. I am running the
post-install script, postinst_rpm.sh, and it fixes up the ownership and
permissions of the critical files.
$ find . -perm +7000 | xargs ls -l
-r-sr-xr-x 1 root bin 8616 Feb 12 12:01
./win4lin/dos7utils
-r-sr-xr-x 1 root bin 6196 Feb 12 12:01 ./win4lin/mcd
-r-sr-xr-x 1 root bin 348828 Feb 12 12:01
./win4lin/publicbin/dosexec
Let me get the debian vs. redhat issues cleared up, because I don't
believe that it matters which system you install it on. I run Debian and
I used the alien program to convert it myself. I ran this:
alien -k -c Win4Lin-5.1.1f-1.i386.rpm
The -k option tells alien to keep the package version (1 in this case)
the same. If you don't do this it will increment it. Not a big deal, but
you never know. The -c option tells alien to do its best to convert the
package scripts to the new packaging format. If you use this switch,
then the scripts will get run for you upon installation and removal.
This works great for this package.
** It'd be great if this advice were added to the knowledge base entry
on using alien for Debian-based distributions. **
Now, let's talk about the problem. All the other files and directories
in the win4lin installation are owned by 6319:124. This is bad.
According to David Peet, they should be bin:bin. This will not effect
usage of the program in any way. Nonetheless it should be fixed, because
it could be a serious security problem on some systems. If you have a
user assigned the uid of 6319, then that person will own these files and
do whatever they like to them. If you have a group assigned the uid of
124, then members of that group may be able to modify these files (no
group write as far as I can tell, though). This should clearly be fixed
up.
A minor problem for me is that alien cannot set-up suid-registration
properly when it converts the package. This means that I have to do it
manually. If the original RPM had the right ownership and permissions,
then this would work. (This is how I found the problem to begin with.)
See the log:
# alien -k -c Win4Lin-5.1.1f-1.i386.rpm
-- Examining Win4Lin-5.1.1f-1.i386.rpm
-- Unpacking Win4Lin-5.1.1f-1.i386.rpm
19090 blocks
----
-- Automatic package debianization
-- Building the package win4lin_5.1.1f-1_i386.deb
dh_testdir
# Nothing to do.
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
cp -a `ls |grep -v debian` debian/tmp
dh_installdocs
dh_installexamples
dh_installmenu
dh_installcron
dh_installchangelogs
dh_compress
dh_suidregister
dh_suidregister: opt/win4lin/bin/mountc has odd uid 6319, not in
/etc/passwd
dh_suidregister: opt/win4lin/bin/mountc has odd gid 124 not in
/etc/group
dh_suidregister: opt/win4lin/mcd has odd uid 6319, not in /etc/passwd
dh_suidregister: opt/win4lin/mcd has odd gid 124 not in /etc/group
dh_suidregister: opt/win4lin/publicbin/dosexec has odd uid 6319, not in
/etc/passwd
dh_suidregister: opt/win4lin/publicbin/dosexec has odd gid 124 not in
/etc/groupdh_installdeb
dh_shlibdeps
dh_gencontrol
dh_makeshlibs
dh_md5sums
dh_builddeb
dpkg-deb: building package `win4lin' in `../win4lin_5.1.1f-1_i386.deb'.
Generation of win4lin_5.1.1f-1_i386.deb complete.
-- Successfully finished
Now, everyone who has installed this (either .rpm or .deb) and has read
this far ;) should do the following:
cd /opt
chown -R bin:bin win4lin
chown root:bin win4lin/dos7utils win4lin/mcd win4lin/publicbin/dosexec
chmod 4555 win4lin/dos7utils win4lin/mcd win4lin/publicbin/dosexec
-Jeff Ebert (of the packaging police???)
"Martin J . Hillyer" wrote:
>
> On Fri, Feb 16, 2001 at 02:13:30AM -0800, David Peet wrote:
> > IT looks like RPM did not complete the install. Each file that is installed
> > is specified to have a particular ownership and group. In the case of
> > "mountc" it is "root" and "bin", and most of the rest of the files
> > (all but four) have owner bin, group bin. If they are not that then
> > RPM screwed up.
> >
> > -David
> >
> > Jeffrey Ebert wrote:
> > >
> > > Can anybody explain these uid and gid numbers in the latest version of
> > > win4lin?
> > >
> > > # ls -l opt/win4lin/bin/mountc
> > > -r-sr-xr-x 1 6319 124 17600 Feb 16 00:01
> > > opt/win4lin/bin/mountc
> > >
> > > I'm betting that it should be root:root, and that mountc is suid root,
> > > but I thought I'd ask.
> > >
> > > By the way, the whole distribution has that ownership, not just the
> > > mountc file.
>
> I have the same owner/group issues in a Debian install, although I
> haven't noticed any detrimental effects. But...
>
> What is the effect of the incomplete install? And what exactly did
> rpm not do? Is there a way (a script?) to make it complete the
> install? Would it be a good idea to change these file owners/groups
> to the correct ones? If so, is there a list somewhere of the correct
> ones?
>
> This raises more questions than it answers.
>
> --
> Martin Hillyer
> Powered by Debian GNU/Linux 2.2.18
> Communications by mutt-1.3.12i
> ~~~~~~~~~~~~~~
> QOTD:
> The tree in which the sap is stagnant remains fruitless.
> -- Hosea Ballou
> _______________________________________________
> Win4Lin-users mailing list
> [EMAIL PROTECTED]
> https://lists.netraverse.com/mailman/listinfo/win4lin-users
_______________________________________________
Win4Lin-users mailing list
[EMAIL PROTECTED]
https://lists.netraverse.com/mailman/listinfo/win4lin-users