Move runas.h to common/ directory
authorDavid Goulet <dgoulet@efficios.com>
Mon, 16 Jan 2012 17:00:24 +0000 (12:00 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Mon, 16 Jan 2012 17:00:24 +0000 (12:00 -0500)
Simply put to improve semantic over the code includes and knowing that
runas.h comes from the common library.

It's arguable to do this across the code base for all internal
libraries. This should be discuss at least for the code tree
consistency.

Signed-off-by: David Goulet <dgoulet@efficios.com>
common/runas.c
common/runas.h [new file with mode: 0644]
include/Makefile.am
include/runas.h [deleted file]
liblttng-kconsumer/lttng-kconsumer.c
liblttng-ustconsumer/lttng-ustconsumer.c
lttng-sessiond/main.c
lttng-sessiond/session.c
lttng-sessiond/ust-app.c

index b3fa81469824ecc6b69979e6a64e408cbd4a5546..22bd2fe8fab208ba6fdc00fc9d37cb91c0cf1244 100644 (file)
@@ -32,6 +32,8 @@
 
 #include <lttngerr.h>
 
 
 #include <lttngerr.h>
 
+#include "runas.h"
+
 #define CHILD_STACK_SIZE       10485760
 
 struct run_as_data {
 #define CHILD_STACK_SIZE       10485760
 
 struct run_as_data {
diff --git a/common/runas.h b/common/runas.h
new file mode 100644 (file)
index 0000000..544653d
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef _RUNAS_H
+#define _RUNAS_H
+
+/*
+ * Copyright (C) 2011 - David Goulet <david.goulet@polymtl.ca>
+ *                      Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; only verion 2
+ * of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
+#include <unistd.h>
+
+int mkdir_recursive_run_as(const char *path, mode_t mode, uid_t uid, gid_t gid);
+int mkdir_run_as(const char *path, mode_t mode, uid_t uid, gid_t gid);
+int open_run_as(const char *path, int flags, mode_t mode, uid_t uid, gid_t gid);
+
+#endif /* _RUNAS_H */
index 00120a6a051dd423980b9d7b71b5db19504a4f6f..fd212f22f0be0a77a6b9076a9a55ea9662a320b0 100644 (file)
@@ -2,4 +2,4 @@ lttnginclude_HEADERS = lttng/lttng.h lttng/lttng-kconsumer.h \
                                           lttng/lttng-ustconsumer.h lttng/lttng-consumer.h
 
 noinst_HEADERS = lttngerr.h lttng-kernel.h lttng-consumerd.h lttng-share.h \
                                           lttng/lttng-ustconsumer.h lttng/lttng-consumer.h
 
 noinst_HEADERS = lttngerr.h lttng-kernel.h lttng-consumerd.h lttng-share.h \
-                                lttng-sessiond-comm.h lttng-kernel-ctl.h lttng-ht.h runas.h
+                                lttng-sessiond-comm.h lttng-kernel-ctl.h lttng-ht.h
diff --git a/include/runas.h b/include/runas.h
deleted file mode 100644 (file)
index 544653d..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#ifndef _RUNAS_H
-#define _RUNAS_H
-
-/*
- * Copyright (C) 2011 - David Goulet <david.goulet@polymtl.ca>
- *                      Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; only verion 2
- * of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- */
-
-#include <unistd.h>
-
-int mkdir_recursive_run_as(const char *path, mode_t mode, uid_t uid, gid_t gid);
-int mkdir_run_as(const char *path, mode_t mode, uid_t uid, gid_t gid);
-int open_run_as(const char *path, int flags, mode_t mode, uid_t uid, gid_t gid);
-
-#endif /* _RUNAS_H */
index 388cc5b20f8f4e67853a01b4ee7038f8a398cf1f..2b69438cadb2b1e7d469ecd5c9f671b5aa36e670 100644 (file)
@@ -33,7 +33,8 @@
 #include <lttng-sessiond-comm.h>
 #include <lttng/lttng-kconsumer.h>
 #include <lttngerr.h>
 #include <lttng-sessiond-comm.h>
 #include <lttng/lttng-kconsumer.h>
 #include <lttngerr.h>
-#include <runas.h>
+
+#include "common/runas.h"
 
 extern struct lttng_consumer_global_data consumer_data;
 extern int consumer_poll_timeout;
 
 extern struct lttng_consumer_global_data consumer_data;
 extern int consumer_poll_timeout;
index 8305b061a882fff9021037e1716ff32fb3f36935..bc262572aa5ed4840063f0ee33295f6f8564460c 100644 (file)
@@ -33,7 +33,8 @@
 #include <lttng/lttng-ustconsumer.h>
 #include <lttng/ust-ctl.h>
 #include <lttngerr.h>
 #include <lttng/lttng-ustconsumer.h>
 #include <lttng/ust-ctl.h>
 #include <lttngerr.h>
-#include <runas.h>
+
+#include "common/runas.h"
 
 extern struct lttng_consumer_global_data consumer_data;
 extern int consumer_poll_timeout;
 
 extern struct lttng_consumer_global_data consumer_data;
 extern int consumer_poll_timeout;
index f7cd81027a43d103bed2499bc4e2bf8b257061be..6f34bb72262f37b307406499af6832fcc525b75d 100644 (file)
@@ -44,7 +44,7 @@
 #include <lttng/lttng-consumer.h>
 
 #include <lttngerr.h>
 #include <lttng/lttng-consumer.h>
 
 #include <lttngerr.h>
-#include <runas.h>
+#include "common/runas.h"
 
 #include "channel.h"
 #include "compat/poll.h"
 
 #include "channel.h"
 #include "compat/poll.h"
index cccb43b74b7dcb23d47275d5d672a03a2ead10e4..050942ceee3457ce02ee8091541af2df640f780c 100644 (file)
@@ -27,8 +27,8 @@
 
 #include <lttng-sessiond-comm.h>
 #include <lttngerr.h>
 
 #include <lttng-sessiond-comm.h>
 #include <lttngerr.h>
-#include <runas.h>
 
 
+#include "common/runas.h"
 #include "session.h"
 
 /*
 #include "session.h"
 
 /*
index 913d2de27acde8c3e276a488430def604f2a1842..209a7fed47fa83b8fa685ad7af848b50fe09aa7b 100644 (file)
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <unistd.h>
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <unistd.h>
-#include <runas.h>
 
 #include <urcu/compiler.h>
 
 #include <lttngerr.h>
 #include <lttng-ht.h>
 #include <lttng-share.h>
 
 #include <urcu/compiler.h>
 
 #include <lttngerr.h>
 #include <lttng-ht.h>
 #include <lttng-share.h>
-#include <runas.h>
 
 
+#include "common/runas.h"
 #include "ust-app.h"
 #include "ust-consumer.h"
 #include "ust-ctl.h"
 #include "ust-app.h"
 #include "ust-consumer.h"
 #include "ust-ctl.h"
This page took 0.028569 seconds and 4 git commands to generate.