Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
/sbin/halt permissions
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
xtemp0raneous
n00b
n00b


Joined: 13 Sep 2004
Posts: 2

PostPosted: Wed Nov 10, 2004 12:15 am    Post subject: /sbin/halt permissions Reply with quote

Hi,
I am perfectly content to use the sudo solution to allow regular users to reboot and halt the system, but I was not able to find how gentoo limits /sbin/halt to superuser only. I'm just curious for my own education. Any good links to this info?

thanks
Back to top
View user's profile Send private message
db_404
Guru
Guru


Joined: 05 Dec 2002
Posts: 336

PostPosted: Wed Nov 10, 2004 5:42 pm    Post subject: Reply with quote

I presume its just checks for the running user being UID 0. A check of the source would confirm that though.
Back to top
View user's profile Send private message
db_404
Guru
Guru


Joined: 05 Dec 2002
Posts: 336

PostPosted: Wed Nov 10, 2004 5:51 pm    Post subject: Reply with quote

Yep, I just looked:

from the halt.c code
Code:

        if (geteuid() != 0) {
                fprintf(stderr, "%s: must be superuser.\n", progname);
                exit(1);
        }
Back to top
View user's profile Send private message
xtemp0raneous
n00b
n00b


Joined: 13 Sep 2004
Posts: 2

PostPosted: Thu Nov 11, 2004 1:49 am    Post subject: Reply with quote

thanks db_404
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum