All of lore.kernel.org
 help / color / mirror / Atom feed
* [Fwd: [Patch] libsemanage: remember and retrieve dontaudit settings]
@ 2009-07-01 13:32 Christopher Pardy
  2009-07-01 14:06 ` Stephen Smalley
  2009-07-01 15:57 ` Daniel J Walsh
  0 siblings, 2 replies; 56+ messages in thread
From: Christopher Pardy @ 2009-07-01 13:32 UTC (permalink / raw)
  To: selinux

[-- Attachment #1: Type: text/plain, Size: 371 bytes --]

Creates a empty file disable_dontaudit in the polciy directory
(/etc/selinux/<policytype>). Checks for the existance of this file to
set the sepol disable don't audit upon handle creation. Also provides
the function "int semanage_get_disable_dontaudit()" which returns the
don't audit property of the current policy.

Signed-off-by: Christopher Pardy <cpardy@redhat.com>

[-- Attachment #2: libsemanage.patch --]
[-- Type: text/plain, Size: 2375 bytes --]

diff -r selinux/libsemanage/include/semanage/handle.h selinux.old/libsemanage/include/semanage/handle.h
72,74d71
< /* Get the whether or not dontaudits are disabled upon commit */
< int semanage_get_disable_dontudit();
< 
Only in selinux/libsemanage/src: boolean_record.o
Only in selinux/libsemanage/src: booleans_activedb.o
Only in selinux/libsemanage/src: booleans_active.o
Only in selinux/libsemanage/src: booleans_file.o
Only in selinux/libsemanage/src: booleans_local.o
Only in selinux/libsemanage/src: booleans_policydb.o
Only in selinux/libsemanage/src: booleans_policy.o
Only in selinux/libsemanage/src: context_record.o
Only in selinux/libsemanage/src: database_activedb.o
Only in selinux/libsemanage/src: database_file.o
Only in selinux/libsemanage/src: database_join.o
Only in selinux/libsemanage/src: database_llist.o
Only in selinux/libsemanage/src: database.o
Only in selinux/libsemanage/src: database_policydb.o
Only in selinux/libsemanage/src: debug.o
Only in selinux/libsemanage/src: direct_api.o
Only in selinux/libsemanage/src: fcontext_record.o
Only in selinux/libsemanage/src: fcontexts_file.o
Only in selinux/libsemanage/src: fcontexts_local.o
Only in selinux/libsemanage/src: fcontexts_policy.o
diff -r selinux/libsemanage/src/handle.c selinux.old/libsemanage/src/handle.c
30d29
< #include <unistd.h>
80,82d78
< 	/* Set disable dontaudit */
< 	sepol_set_disable_dontaudit(sh->sepolh,semanage_get_disable_dontaudit())
< 
117,135d112
< int semanage_get_disable_dontaudit()
< {
< 	/*get the policy type*/
< 	char *poltype;
< 	selinux_getpolicytype(&poltype);
< 	/*create a pathname*/
< 	char path[255];
< 	strcpy(path,"/etc/selinux/");
< 	strcat(path,poltype);
< 	strcat(path,"/disable_dontaudit");
< 	/*free the string poltype string*/
< 	free(poltype);
< 	/*check for the files existance*/
< 	if (access(path,F_OK) == 0)
< 		return 1;
< 	else
< 		return 0;
< }
< 
141,158d117
< 	/*get the policy type*/
< 	char *poltype;
< 	selinux_getpolicytype(&poltype);
< 	/*create a pathname*/
< 	char path[255];
< 	strcpy(path,"/etc/selinux/");
< 	strcat(path,poltype);
< 	strcat(path,"/disable_dontaudit");
< 	/*free the string poltype string*/
< 	free(poltype);
< 	/*touch or delete the file*/
< 	if (disable_dontaudit != 0){
< 		FILE *touch;
< 		touch = fopen(path,"w");
< 		fclose(touch);
< 	}else
< 		remove(path);
< 
Only in selinux/libsepol/tests: debug.o


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

end of thread, other threads:[~2009-07-07 17:30 UTC | newest]

Thread overview: 56+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-01 13:32 [Fwd: [Patch] libsemanage: remember and retrieve dontaudit settings] Christopher Pardy
2009-07-01 14:06 ` Stephen Smalley
2009-07-01 14:16   ` Stephen Smalley
2009-07-01 15:52     ` Christopher Pardy
2009-07-01 17:01       ` Stephen Smalley
2009-07-01 16:47   ` Daniel J Walsh
2009-07-01 15:57 ` Daniel J Walsh
2009-07-01 17:04   ` Stephen Smalley
2009-07-01 17:16     ` Daniel J Walsh
2009-07-01 17:40     ` Daniel J Walsh
2009-07-02  2:08       ` Re:[Patch 0/2] libsemanage: remember and retrieve dontaudit settings Christopher Pardy
2009-07-02  2:11         ` [Patch 1/2] " Christopher Pardy
2009-07-02 12:39           ` Stephen Smalley
2009-07-02 13:40             ` Christopher Pardy
2009-07-02  2:13         ` [Patch 2/2] " Christopher Pardy
2009-07-02 12:46           ` Stephen Smalley
2009-07-02 13:55             ` Christopher Pardy
2009-07-02 14:13               ` Stephen Smalley
2009-07-02 14:30                 ` Christopher Pardy
2009-07-02 14:35                   ` Stephen Smalley
2009-07-02 15:32                     ` [Patch 2/2] libsemanage: create a don't audit flag Christopher Pardy
2009-07-02 17:09                       ` Stephen Smalley
2009-07-06 12:26                         ` Christopher Pardy
2009-07-06 12:31                           ` Christopher Pardy
2009-07-06 13:46                             ` Stephen Smalley
2009-07-06 13:52                               ` Stephen Smalley
2009-07-06 14:42                                 ` [Patch 1/2] libsepol: method to check disable dontaudit flag Christopher Pardy
2009-07-06 14:54                                   ` [Patch 2/2] libsemanage: maintain disable dontaudit state between handle commits Christopher Pardy
2009-07-06 15:03                                     ` Stephen Smalley
2009-07-06 15:17                                       ` Daniel J Walsh
2009-07-06 15:54                                         ` Christopher Pardy
2009-07-06 16:55                                           ` Stephen Smalley
2009-07-06 17:37                                     ` [Patch 2/2 v2] " Christopher Pardy
2009-07-06 18:07                                       ` Stephen Smalley
2009-07-06 18:12                                         ` Stephen Smalley
2009-07-06 19:10                                       ` [Patch 2/2 v3] " Christopher Pardy
2009-07-06 19:30                                         ` Stephen Smalley
2009-07-07 11:45                                           ` Stephen Smalley
2009-07-07 12:47                                             ` Christopher Pardy
2009-07-07 12:54                                               ` Stephen Smalley
2009-07-07 13:48                                         ` [Patch 2/2 v4] " Christopher Pardy
2009-07-07 14:20                                           ` Stephen Smalley
2009-07-07 14:41                                             ` Christopher Pardy
2009-07-07 14:53                                               ` Stephen Smalley
2009-07-07 14:59                                                 ` Joshua Brindle
2009-07-07 16:07                                           ` Christopher Pardy
2009-07-07 16:55                                             ` Stephen Smalley
2009-07-07 17:30                                             ` [Patch 2/2 v6] " Christopher Pardy
2009-07-06 17:41                                     ` [Patch 3/2] semodule: maintain old functionality Christopher Pardy
2009-07-06 17:49                                       ` Joshua Brindle
2009-07-06 18:01                                       ` [Patch 3/2 v2] " Christopher Pardy
2009-07-02 14:16               ` [Patch 2/2] libsemanage, libselinux: Get don't audit settings from handle and remember settings after commit Christopher Pardy
2009-07-02 12:33         ` Re:[Patch 0/2] libsemanage: remember and retrieve dontaudit settings Stephen Smalley
2009-07-02 14:01           ` [Patch " Christopher Pardy
2009-07-02 12:40         ` Stephen Smalley
2009-07-01 19:19   ` [Fwd: [Patch] libsemanage: remember and retrieve dontaudit settings] Joshua Brindle

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.