chiark / gitweb /
service: add minimal access control logic for notifcation socket
[elogind.git] / src / service.h
index d644e7207ab41fa1e26f83f9bcb73e76e16caa71..7b85771a30fb9911672ad2e172e32942e31ddad6 100644 (file)
@@ -41,7 +41,7 @@ typedef enum ServiceState {
         SERVICE_STOP_POST,
         SERVICE_FINAL_SIGTERM,     /* In case the STOP_POST executable hangs, we shoot that down, too */
         SERVICE_FINAL_SIGKILL,
-        SERVICE_MAINTAINANCE,
+        SERVICE_MAINTENANCE,
         SERVICE_AUTO_RESTART,
         _SERVICE_STATE_MAX,
         _SERVICE_STATE_INVALID = -1
@@ -76,12 +76,22 @@ typedef enum ServiceExecCommand {
         _SERVICE_EXEC_COMMAND_INVALID = -1
 } ServiceExecCommand;
 
+typedef enum NotifyAccess {
+        NOTIFY_NONE,
+        NOTIFY_ALL,
+        NOTIFY_MAIN,
+        _NOTIFY_ACCESS_MAX,
+        _NOTIFY_ACCESS_INVALID = -1
+} NotifyAccess;
+
 struct Service {
         Meta meta;
 
         ServiceType type;
         ServiceRestart restart;
 
+        NotifyAccess notify_access;
+
         /* If set we'll read the main daemon PID from this file */
         char *pid_file;
 
@@ -147,4 +157,7 @@ ServiceType service_type_from_string(const char *s);
 const char* service_exec_command_to_string(ServiceExecCommand i);
 ServiceExecCommand service_exec_command_from_string(const char *s);
 
+const char* notify_access_to_string(NotifyAccess i);
+NotifyAccess notify_access_from_string(const char *s);
+
 #endif