All of lore.kernel.org
 help / color / mirror / Atom feed
* [refpolicy] Make crond able to use pam_namespace.so
@ 2011-02-13 10:46 HarryCiao
  2011-02-13 12:10 ` Dominick Grift
  0 siblings, 1 reply; 7+ messages in thread
From: HarryCiao @ 2011-02-13 10:46 UTC (permalink / raw)
  To: refpolicy





Hello Chris and Dom,

Please hold on this patch.  I am now puzzled at if we should have crond use pam_namespace.so at all.

The problem I run into is that the cron job process does not share the same namespace with the cron job submitter's process. 

If a staff user(mapped to staff_u) specifies cron job to write into a "/home/staff/somefile", if $HOME is polyinstantiated, then the cron job process will attempt to write into somefile to the BASE directory of /home/staff, rather than the MEMBER directory of /home/home.inst/staff_xxx created by ssh or login, resulting that this somefile is invisible to the staff user, only the root user could see it in the original base directory of /home/staff.

How could I have the cron job process share the same namespace with the user's login session?

Would below plan ever work?
1.  when crontab command creates user's cron job files in /var/spool/cron, the file name not only contains user's Linux User name, but also the submitter's role and MLS level;

2. crond determines cron job process security context from the name of above cron job files, rather than by get_default_context_with_level(). The cron job process will be in the same security context as the relevant submitter, rather than cronjob_t fetched from system_r:crond_t:s0 related entries in contexts/default_contexts or users/[user].

3. crond PAM configs uses pam_namespace.so, which will find the cron job submitter's polyinstantiation member directory already created by ssh or login in the polyinstantiation parent directory.


Thanks,
Harry

From: harrytaurus2002@hotmail.com
To: cpebenito at tresys.com; refpolicy at oss1.tresys.com
Date: Fri, 11 Feb 2011 08:54:29 +0000
Subject: [refpolicy] Make crond able to use pam_namespace.so








Hi Chirs,

Another patch for crond_t, call the files_polyinstantiate_all() interface for it as what has been done for other entrypoint applications' domains, so that crond could work well when pam_namespace.so is used in its PAM config files and polyinstantiation is enabled.

Thanks,

Best regards,
Harry
 		 	   		  

_______________________________________________
refpolicy mailing list
refpolicy at oss.tresys.com
http://oss.tresys.com/mailman/listinfo/refpolicy 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.tresys.com/pipermail/refpolicy/attachments/20110213/2369fc73/attachment.html 

^ permalink raw reply	[flat|nested] 7+ messages in thread
* [refpolicy] Make crond able to use pam_namespace.so
@ 2011-02-11  8:54 HarryCiao
  2011-02-18 14:07 ` Christopher J. PeBenito
  0 siblings, 1 reply; 7+ messages in thread
From: HarryCiao @ 2011-02-11  8:54 UTC (permalink / raw)
  To: refpolicy


Hi Chirs,

Another patch for crond_t, call the files_polyinstantiate_all() interface for it as what has been done for other entrypoint applications' domains, so that crond could work well when pam_namespace.so is used in its PAM config files and polyinstantiation is enabled.

Thanks,

Best regards,
Harry
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.tresys.com/pipermail/refpolicy/attachments/20110211/01d96431/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Make-crond-able-to-polyinstantiate-all.patch
Type: text/x-patch
Size: 1134 bytes
Desc: not available
Url : http://oss.tresys.com/pipermail/refpolicy/attachments/20110211/01d96431/attachment.bin 

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-02-18 14:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-13 10:46 [refpolicy] Make crond able to use pam_namespace.so HarryCiao
2011-02-13 12:10 ` Dominick Grift
2011-02-14  4:37   ` HarryCiao
2011-02-14 15:27     ` Daniel J Walsh
2011-02-16  7:24       ` HarryCiao
  -- strict thread matches above, loose matches on Subject: below --
2011-02-11  8:54 HarryCiao
2011-02-18 14:07 ` Christopher J. PeBenito

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.