Imported Upstream version 1.6.9p14
[debian/sudo] / parse.h
diff --git a/parse.h b/parse.h
index 73875574f85238dcb08b75c1172675126dfe291e..a9bbc8e0e7a40910688cce66cab347b3cfebdf07 100644 (file)
--- a/parse.h
+++ b/parse.h
@@ -1,5 +1,6 @@
 /*
- * Copyright (c) 1996,1998-2000,2004 Todd C. Miller <Todd.Miller@courtesan.com>
+ * Copyright (c) 1996, 1998-2000, 2004, 2007
+ *     Todd C. Miller <Todd.Miller@courtesan.com>
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -13,7 +14,7 @@
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  *
- * $Sudo: parse.h,v 1.14 2004/08/02 18:44:58 millert Exp $
+ * $Sudo: parse.h,v 1.14.2.2 2008/02/09 14:44:48 millert Exp $
  */
 
 #ifndef _SUDO_PARSE_H
@@ -33,6 +34,9 @@ struct matchstack {
        int runas;
        int nopass;
        int noexec;
+       int setenv;
+       char *role;
+       char *type;
 };
 
 /*
@@ -44,12 +48,22 @@ struct sudo_command {
     char *args;
 };
 
+/*
+ * SELinux-specific container struct.
+ * Currently just contains a role and type.
+ */
+struct selinux_info {
+    char *role;
+    char *type;
+};
+
 #define user_matches   (match[top-1].user)
 #define cmnd_matches   (match[top-1].cmnd)
 #define host_matches   (match[top-1].host)
 #define runas_matches  (match[top-1].runas)
 #define no_passwd      (match[top-1].nopass)
 #define no_execve      (match[top-1].noexec)
+#define setenv_ok      (match[top-1].setenv)
 
 /*
  * Structure containing command matches if "sudo -l" is used.
@@ -61,8 +75,15 @@ struct command_match {
     char *cmnd;
     size_t cmnd_len;
     size_t cmnd_size;
+    char *role;
+    size_t role_len;
+    size_t role_size;
+    char *type;
+    size_t type_len;
+    size_t type_size;
     int nopasswd;
     int noexecve;
+    int setenv;
 };
 
 /*