From 6bc43fea06c8c81a59cab6d98291835771c41fd6 Mon Sep 17 00:00:00 2001
From: nekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Date: Thu, 27 Dec 2007 23:32:47 +0000
Subject: [PATCH] Document selinux_file_context.

---
 ChangeLog         | 1 +
 libmisc/copydir.c | 8 ++++++++
 2 files changed, 9 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index e3737422..4a297728 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,7 @@
 	to -1, instead of incrementing it, and checking if not nul at the
 	end.
 	* libmisc/copydir.c: Avoid assignment in comparisons.
+	* libmisc/copydir.c: Document selinux_file_context.
 
 2007-12-27  Nicolas François  <nicolas.francois@centraliens.net>
 
diff --git a/libmisc/copydir.c b/libmisc/copydir.c
index dbdf3e85..6b8bdf71 100644
--- a/libmisc/copydir.c
+++ b/libmisc/copydir.c
@@ -74,6 +74,14 @@ static int copy_file (const char *src, const char *dst,
                       uid_t uid, gid_t gid);
 
 #ifdef WITH_SELINUX
+/*
+ * selinux_file_context - Set the security context before any file or
+ *                        directory creation.
+ *
+ *	selinux_file_context () should be called before any creation of file,
+ *	symlink, directory, ...
+ *
+ */
 static int selinux_file_context (const char *dst_name)
 {
 	security_context_t scontext = NULL;
-- 
2.40.0