Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 64393 - basepolicy: sysadm_r can't exec ssh-keygen
Summary: basepolicy: sysadm_r can't exec ssh-keygen
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Chris PeBenito (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-17 06:14 UTC by Sören Lorenz
Modified: 2004-10-01 10:03 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
policy patch that includes a user domain macro for ssh_keygen_exec_t (sshkeygen.diff,2.71 KB, patch)
2004-09-19 05:44 UTC, petre rodan (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sören Lorenz 2004-09-17 06:14:34 UTC
Permission is denied for ssh-keygen when I try to execute it as root:sysadm_t.

Reproducible: Always
Steps to Reproduce:

Actual Results:  
avc:  denied  { read } for  pid=22529 exe=/bin/bash name=ssh-keygen dev=hda2
ino=73040 scontext=root:sysadm_r:sysadm_t
tcontext=system_u:object_r:ssh_keygen_exec_t tclass=file

Expected Results:  
No denials.
Comment 1 petre rodan (RETIRED) gentoo-dev 2004-09-19 05:44:34 UTC
Created attachment 39911 [details, diff]
policy patch that includes a user domain macro for ssh_keygen_exec_t

diff based on selinux-base-policy-20040906
Comment 2 Sören Lorenz 2004-09-23 09:29:46 UTC
Your patch works, the keys are created. Though it produces this denial two times:

avc:  denied  { read write } for  pid=32144 exe=/usr/bin/ssh-keygen name=tty dev=hda2 ino=176660 scontext=root:sysadm_r:sysadm_ssh_keygen_t tcontext=system_u:object_r:devtty_t tclass=chr_file

Good work!

Regards,

S
Comment 3 Sören Lorenz 2004-09-23 09:29:46 UTC
Your patch works, the keys are created. Though it produces this denial two times:

avc:  denied  { read write } for  pid=32144 exe=/usr/bin/ssh-keygen name=tty dev=hda2 ino=176660 scontext=root:sysadm_r:sysadm_ssh_keygen_t tcontext=system_u:object_r:devtty_t tclass=chr_file

Good work!

Regards,

Sören Lorenz
Comment 5 Chris PeBenito (RETIRED) gentoo-dev 2004-10-01 10:03:14 UTC
fixed in policy cvs a different way