Re: How to make mount command mount partions as user not only as root ?
- From: Marcel Bruinsma <we-love-all-spam@xxxxxxxxx>
- Date: Thu, 15 May 2008 09:48:18 +0200
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
In article <g0gac2$1dc1$1@xxxxxxxxxxx>,
=SERGE= wrote:
Why cant' I pass params to mount command directly?
It can be done with a wrapper program:
extern int execve(char *,char **,char **);
extern int setuid(int);
const char m[] = "/bin/mount";
int
main(int ac, char **av, char **ev)
{
av[0] = m;
setuid(0);
execve(m,av,ev);
return 1;
}
Put these lines in file 'mymount.c'
Compile with 'cc -o mymount mymount.c' (ignore warnings)
Run 'su -c "install -so root -m 4550 mymount ${HOME}/bin/mount"'
Make sure '${HOME}/bin' is the first directory in ${PATH}
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
iD8DBQFIK+rC+Gl3NVTic0gRApJHAJ470epkN5zxsD7FwVVHBqqNs12lKQCgp5ca
vrPODepYGzdemVyzxYO7vyM=
=9BSt
-----END PGP SIGNATURE-----
.
- References:
- How to make mount command mount partions as user not only as root ?
- From: =SERGE=
- Re: How to make mount command mount partions as user not only as root ?
- From: Dances With Crows
- Re: How to make mount command mount partions as user not only as root ?
- From: =SERGE=
- Re: How to make mount command mount partions as user not only as root ?
- From: Joe Pfeiffer
- Re: How to make mount command mount partions as user not only as root ?
- From: Aragorn
- Re: How to make mount command mount partions as user not only as root ?
- From: =SERGE=
- How to make mount command mount partions as user not only as root ?
- Prev by Date: Re: How to make mount command mount partions as user not only as root ?
- Next by Date: Re: Disk noise in audio
- Previous by thread: Re: How to make mount command mount partions as user not only as root ?
- Next by thread: Re: How to make mount command mount partions as user not only as root ?
- Index(es):