]> granicus.if.org Git - sudo/commitdiff
Move contents of timestamp.h into check.h.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 25 Mar 2013 15:28:21 +0000 (11:28 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 25 Mar 2013 15:28:21 +0000 (11:28 -0400)
plugins/sudoers/check.c
plugins/sudoers/check.h
plugins/sudoers/timestamp.c
plugins/sudoers/timestamp.h [deleted file]

index 5f7eb0a6eb4db7fc1aa1adf5cebc19b5a65a7bc3..abdaf707704320482b417f236c4ca400100f14dd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1993-1996,1998-2005, 2007-2012
+ * Copyright (c) 1993-1996,1998-2005, 2007-2013
  *     Todd C. Miller <Todd.Miller@courtesan.com>
  *
  * Permission to use, copy, modify, and distribute this software for any
@@ -46,7 +46,6 @@
 #include <grp.h>
 
 #include "sudoers.h"
-#include "timestamp.h"
 #include "check.h"
 
 static bool  display_lecture(int);
index af5eabb8e0f075a5e9a3c66baba8601e521a3c94..0042fc6821419ffb99effbd37c7f3c69eeb4b255 100644 (file)
@@ -1,5 +1,6 @@
 /*
- * Copyright (c) 2012 Todd C. Miller <Todd.Miller@courtesan.com>
+ * Copyright (c) 1993-1996,1998-2005, 2007-2013
+ *     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
  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * 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.
  */
 
-#ifndef _SUDOERS_CHECK_H
-#define _SUDOERS_CHECK_H
+#ifndef _SUDOERS_TIMESTAMP_H
+#define _SUDOERS_TIMESTAMP_H
+
+/* Status codes for timestamp_status() */
+#define TS_CURRENT             0
+#define TS_OLD                 1
+#define TS_MISSING             2
+#define TS_NOFILE              3
+#define TS_ERROR               4
 
+/* This may be a function in some implementations. */
 #define already_lectured(s)    (s != TS_MISSING && s != TS_ERROR)
 
-#endif /* _SUDOERS_CHECK_H */
+/*
+ * Info stored in tty ticket from stat(2) to help with tty matching.
+ */
+struct sudo_tty_info {
+    dev_t dev;                 /* ID of device tty resides on */
+    dev_t rdev;                        /* tty device ID */
+    ino_t ino;                 /* tty inode number */
+    struct timeval ctime;      /* tty inode change time */
+    pid_t sid;                 /* ID of session with controlling tty */
+};
+
+bool  update_timestamp(void);
+int   build_timestamp(void);
+int   timestamp_status(void);
+
+#endif /* _SUDOERS_TIMESTAMP_H */
index f884e614df90b2c9af38e38e7a5f14741cf01bb7..62cd3582e83ef5f0f2941fd3a452dc1e4d52afa7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1993-1996,1998-2005, 2007-2012
+ * Copyright (c) 1993-1996,1998-2005, 2007-2013
  *     Todd C. Miller <Todd.Miller@courtesan.com>
  *
  * Permission to use, copy, modify, and distribute this software for any
@@ -61,7 +61,7 @@
 #include <grp.h>
 
 #include "sudoers.h"
-#include "timestamp.h"
+#include "check.h"
 
 static bool  tty_is_devpts(const char *);
 
diff --git a/plugins/sudoers/timestamp.h b/plugins/sudoers/timestamp.h
deleted file mode 100644 (file)
index cfa06f6..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 1993-1996,1998-2005, 2007-2012
- *     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
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- * 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.
- */
-
-#ifndef _SUDOERS_TIMESTAMP_H
-#define _SUDOERS_TIMESTAMP_H
-
-/* Status codes for timestamp_status() */
-#define TS_CURRENT             0
-#define TS_OLD                 1
-#define TS_MISSING             2
-#define TS_NOFILE              3
-#define TS_ERROR               4
-
-/*
- * Info stored in tty ticket from stat(2) to help with tty matching.
- */
-struct sudo_tty_info {
-    dev_t dev;                 /* ID of device tty resides on */
-    dev_t rdev;                        /* tty device ID */
-    ino_t ino;                 /* tty inode number */
-    struct timeval ctime;      /* tty inode change time */
-    pid_t sid;                 /* ID of session with controlling tty */
-};
-
-bool  update_timestamp(void);
-int   build_timestamp(void);
-int   timestamp_status(void);
-
-#endif /* _SUDOERS_TIMESTAMP_H */