Skip to contentSkip to conversation

pppd_t domain

DISCUSSION Lonnie Cumberland 2 participants 2 messages Mar 3, 2002 – Mar 4, 2002 1 message not in the archive SELinux security module

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hello Russell,

Thanks for replying to my email. I have also download and printed out all of the SELinux documantation to try and get a better feel for things.

I am sorry to bother you again but I made the changes to the device file and now when I do a "make load" I get an error:

------------------------------------------------
/usr/local/selinux/bin/checkpolicy: loading policy configuration from policy.conf

error in the statement ending on line 25168 (token ';'): unknown type mesg_t

/usr/local/selinux/bin/checkpolicy: error(s) encountered while parsing configuration
make: *** [policy] Error 1
--------------------------------------------------------

I will now try and go through the archives to see if something in there can clear things up a little as I am just trying to get your pppd.te instadded an working.

Thanks again,
Lonnie

Quoted 40 lines · you
Quoted 4 lines

I was trying to get your pppd.te file installed but whne I did a "make load" I get:
error in the statement ending on line 12200 (token ';'): unknown type net_device_t

You need something like the following in types/device.te:

# net_device_t is the type of /dev/ppp
type net_device_t, file_type;
Quoted 8 lines

You mentioned that:

Quoted 5 lines

Also /dev/ppp has to have the SID system_u:object_r:net_device_t, use devfs_contexts if you have devfs or file_contexts and a
relabel otherwise (or just a chsid as a faster alternative to a relabel).

but I am a little unclear as to what I need to do exactly.

Firstly familiarise yourself with chsid/chcon and the file_contexts file. If you check the list archives you should see some messages explaining all this.

Quoted 4 lines

Also, how do I add the pptp vpn daemon to this as well so that I will not get the errors in SELinux and so that my vpn can make the
connection.

Not sure. Never tried doing that. Start with what I've done for pppd and just play with it.

Most of the SE Linux stuff is not properly documented. Reading the source code helps.

--
If you send email to me or to a mailing list that I use which has

Quoted 1 line

4 lines of legalistic junk at the end then you are specifically

authorizing me to do whatever I wish with the message and all other messages from your domain, by posting the message you agree that your long legalistic sig is void.

Signature · 21 lines
 Lonnie Cumberland
 OutStep Technologies Incorporated
 EMAIL: [email protected]
      : [email protected]

 The Basis Express Virtual Office
               &
 Data Backup and Recovery Services

 URL: http://www.basis-express.com

"The Virtual Office without boundries!!!"





--
You have received this message because you are subscribed to the selinux list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#2 lore raw
Quoted 9 lines · Lonnie Cumberland

/usr/local/selinux/bin/checkpolicy: loading policy configuration from policy.conf

error in the statement ending on line 25168 (token ';'): unknown type mesg_t

/usr/local/selinux/bin/checkpolicy: error(s) encountered while parsing configuration
make: *** [policy] Error 1

I'd suggest looking at line 25168 of policy.conf, as the error message says. According to the message, that line refers to an undefined type mesg_t. The most probable cause is that you made a typo while editing the policy.

Quoted 9 lines

You need something like the following in types/device.te:

# net_device_t is the type of /dev/ppp
type net_device_t, file_type;

Also /dev/ppp has to have the SID system_u:object_r:net_device_t, use devfs_contexts if you have devfs or file_contexts and a
relabel otherwise (or just a chsid as a faster alternative to a relabel).

When I merged Russell's pppd domain into our example policy, I renamed his net_device_t type to ppp_device_t in device.te and pppd.te to be more precise. In file_contexts, I added:
/usr/sbin/pppd system_u:object_r:pppd_exec_t
/dev/ppp system_u:object_r:ppp_device_t

After editing file_contexts, you can then run 'make relabel' to relabel the filesystem. Or, to avoid taking the time to recheck the entire filesystem, you can just relabel manually as follows:
chcon system_u:object_r:pppd_exec_t /usr/sbin/pppd
chcon system_u:object_r:ppp_device_t /dev/ppp

Quoted 3 lines

Also, how do I add the pptp vpn daemon to this as well so that I will not get the errors in SELinux and so that my vpn can make the connection.

To place your pptpd daemon into the same domain as pppd, simply set the executable type on the pptpd daemon. You would add a line to file_contexts for this daemon and run 'make relabel' or run chcon to set the context on /usr/sbin/pptpd. You then need to restart the daemon, either by rebooting or by using run_init on the /etc/init.d script for the daemon. At that point, you will likely find that you still need to add further permissions to the pppd_t domain for the pptpd daemon.

--
Stephen D. Smalley, NAI Labs
[email protected]

--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.