Re: Compiling src.rpms -perms


Subject: Re: Compiling src.rpms -perms
From: Mike Tibor (tibor@lib.uaa.alaska.edu)
Date: Tue Feb 19 2002 - 08:47:16 AKST


On Mon, 18 Feb 2002, Eric Fortner wrote:

> Hello all.....
>
> I am trying out some new things with my boxs at home to use at
> work.... I want to compile my src.rpms for redhat with root.newgroup
> so that I can get rid of the the world rwx perms on some sellect
> rpms......
>
> I have installed some srpms to have a look at the spec files and see I
> can change the default -root.root to whatever but I see no listing on
> some of them for the default directory/data -perms....
>
> I know redhat sets its root to 022 and users to 002 and I want my
> permissions to be users 027 and root to be 027 with users belonging to
> a group allowed to use the srpms I compile.....
>
> If I set/change the default umask in ~/ or /etc/bashrc it gets kind of
> wild going to each and every file to set correct group and no rwx for
> the world....
>
> can someone point how to find an easy way to explore tighter perms for
> my works boxes
>
> some examples:
> sylpheed, mozilla, xmms, xfce, etc.....
> I know I can just go into the /usr/bin and change the binaries, but I
> want to change my boxes security a bit more than that..........

Normally from what I've seen, the install permissions are in the Makefile
in the source tarball. You could just edit the appropriate line(s) in the
Makefile and then do a "rpm -bb <specfile>". It's a little tedious to do
this correctly, as you have to do something like the following:
(you don't mention which distro you have, so I'm assuming RH)

cd /usr/src/redhat/SOURCES
tar zxf package.tar.gz
cd package
(edit Makefile appropriately)
cd ..
tar zcf package.tar.gz package
cd ../SPECS
rpm -bb package.spec

Hope that helps,
Mike

-- 
Mike Tibor         Univ. of Alaska Anchorage    (907) 786-1001 voice
Network Technician     Consortium Library         (907) 786-6050 fax
tibor@lib.uaa.alaska.edu       http://www.lib.uaa.alaska.edu/~tibor/
http://www.lib.uaa.alaska.edu/~tibor/pgpkey  for PGP public key



This archive was generated by hypermail 2a23 : Tue Feb 19 2002 - 08:47:18 AKST