--- /dev/null
+/*
+ * Copyright (c) 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
+ * 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.
+ */
+
+#ifndef _SUDO_FILEOPS_H
+#define _SUDO_FILEOPS_H
+
+/*
+ * Flags for lock_file()
+ */
+#define SUDO_LOCK 1 /* lock a file */
+#define SUDO_TLOCK 2 /* test & lock a file (non-blocking) */
+#define SUDO_UNLOCK 4 /* unlock a file */
+
+int lock_file(int, int);
+int touch(int, char *, struct timeval *);
+char *sudo_parseln(FILE *);
+
+#endif /* _SUDO_FILEOPS_H */
#include <error.h>
#include <alloc.h>
#include <list.h>
+#include <fileops.h>
#include <missing.h>
#include "defaults.h"
#include "logging.h"
*/
#define SUDO_PASS_MAX 256
-/*
- * Flags for lock_file()
- */
-#define SUDO_LOCK 1 /* lock a file */
-#define SUDO_TLOCK 2 /* test & lock a file (non-blocking) */
-#define SUDO_UNLOCK 4 /* unlock a file */
-
struct lbuf;
struct passwd;
void dump_defaults(void);
void dump_auth_methods(void);
-/* fileops.c */
-int lock_file(int, int);
-int touch(int, char *, struct timeval *);
-char *sudo_parseln(FILE *);
-
/* getspwuid.c */
char *sudo_getepw(const struct passwd *);
#include <pathnames.h>
#include <limits.h>
-#include "compat.h"
-#include "alloc.h"
-#include "error.h"
-#include "list.h"
-#include "missing.h"
+
+#include <compat.h>
+#include <alloc.h>
+#include <error.h>
+#include <fileops.h>
+#include <list.h>
+#include <missing.h>
#ifdef __TANDEM
# define ROOT_UID 65535
*/
#define SUDO_PASS_MAX 256
-/*
- * Flags for lock_file()
- */
-#define SUDO_LOCK 1 /* lock a file */
-#define SUDO_TLOCK 2 /* test & lock a file (non-blocking) */
-#define SUDO_UNLOCK 4 /* unlock a file */
-
/*
* Flags for tgetpass()
*/
/* zero_bytes.c */
void zero_bytes(volatile void *, size_t);
-/* fileops.c */
-int lock_file(int, int);
-char *sudo_parseln(FILE *);
-
/* script.c */
int script_duplow(int);
int script_execve(struct command_details *details, char *argv[], char *envp[],