go back to using explicit install calls in rules due to renaming required
[debian/sudo] / defaults.h
index a30948c35c7fee5c7f6e068e3a57f6458fbceb48..eb2188a149fa8720f8a1920e479b2e7722937760 100644 (file)
@@ -1,5 +1,6 @@
 /*
- * Copyright (c) 1999-2001 Todd C. Miller <Todd.Miller@courtesan.com>
+ * Copyright (c) 1999-2005, 2008, 2010
+ *     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
@@ -16,8 +17,6 @@
  * Sponsored in part by the Defense Advanced Research Projects
  * Agency (DARPA) and Air Force Research Laboratory, Air Force
  * Materiel Command, USAF, under agreement number F39502-99-1-0512.
- *
- * $Sudo: defaults.h,v 1.28 2004/02/13 21:36:43 millert Exp $
  */
 
 #ifndef _SUDO_DEFAULTS_H
@@ -53,6 +52,7 @@ struct sudo_defs_types {
     union {
        int flag;
        int ival;
+       double fval;
        enum def_tupple tuple;
        char *str;
        mode_t mode;
@@ -62,7 +62,7 @@ struct sudo_defs_types {
 
 /*
  * Four types of defaults: strings, integers, and flags.
- * Also, T_INT or T_STR may be ANDed with T_BOOL to indicate that
+ * Also, T_INT, T_FLOAT or T_STR may be ANDed with T_BOOL to indicate that
  * a value is not required.  Flags are boolean by nature...
  */
 #undef T_INT
@@ -83,6 +83,8 @@ struct sudo_defs_types {
 #define T_LOGPRI       0x008
 #undef T_TUPLE
 #define T_TUPLE                0x009
+#undef T_FLOAT
+#define T_FLOAT                0x010
 #undef T_MASK
 #define T_MASK         0x0FF
 #undef T_BOOL
@@ -90,11 +92,23 @@ struct sudo_defs_types {
 #undef T_PATH
 #define T_PATH         0x200
 
+/*
+ * Argument to update_defaults()
+ */
+#define SETDEF_GENERIC 0x01
+#define        SETDEF_HOST     0x02
+#define        SETDEF_USER     0x04
+#define        SETDEF_RUNAS    0x08
+#define        SETDEF_CMND     0x10
+#define SETDEF_ALL     (SETDEF_GENERIC|SETDEF_HOST|SETDEF_USER|SETDEF_RUNAS|SETDEF_CMND)
+
 /*
  * Prototypes
  */
-void dump_default      __P((void));
 int set_default                __P((char *, char *, int));
+int update_defaults    __P((int));
+void dump_default      __P((void));
+void dump_defaults     __P((void));
 void init_defaults     __P((void));
 void list_options      __P((void));