summaryrefslogtreecommitdiffstats
path: root/security/tomoyo/realpath.h
diff options
context:
space:
mode:
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>2010-02-11 01:42:40 +0100
committerJames Morris <jmorris@namei.org>2010-02-14 23:00:18 +0100
commit76bb0895d038be7bcdb6ccfcd2dd7deb30371d6b (patch)
tree5948c68b08561deb20d155853faed475a15a4235 /security/tomoyo/realpath.h
parentTOMOYO: Add refcounter on string data. (diff)
downloadlinux-76bb0895d038be7bcdb6ccfcd2dd7deb30371d6b.tar.xz
linux-76bb0895d038be7bcdb6ccfcd2dd7deb30371d6b.zip
TOMOYO: Merge headers.
Gather structures and constants scattered around security/tomoyo/ directory. This is for preparation for adding garbage collector since garbage collector needs to know structures and constants which TOMOYO uses. Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Acked-by: Serge Hallyn <serue@us.ibm.com> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/tomoyo/realpath.h')
-rw-r--r--security/tomoyo/realpath.h76
1 files changed, 0 insertions, 76 deletions
diff --git a/security/tomoyo/realpath.h b/security/tomoyo/realpath.h
deleted file mode 100644
index b94cb512adb5..000000000000
--- a/security/tomoyo/realpath.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * security/tomoyo/realpath.h
- *
- * Get the canonicalized absolute pathnames. The basis for TOMOYO.
- *
- * Copyright (C) 2005-2009 NTT DATA CORPORATION
- *
- * Version: 2.2.0 2009/04/01
- *
- */
-
-#ifndef _SECURITY_TOMOYO_REALPATH_H
-#define _SECURITY_TOMOYO_REALPATH_H
-
-struct path;
-struct tomoyo_path_info;
-struct tomoyo_io_buffer;
-
-/* Convert binary string to ascii string. */
-int tomoyo_encode(char *buffer, int buflen, const char *str);
-
-/* Returns realpath(3) of the given pathname but ignores chroot'ed root. */
-int tomoyo_realpath_from_path2(struct path *path, char *newname,
- int newname_len);
-
-/*
- * Returns realpath(3) of the given pathname but ignores chroot'ed root.
- * These functions use kzalloc(), so the caller must call kfree()
- * if these functions didn't return NULL.
- */
-char *tomoyo_realpath(const char *pathname);
-/*
- * Same with tomoyo_realpath() except that it doesn't follow the final symlink.
- */
-char *tomoyo_realpath_nofollow(const char *pathname);
-/* Same with tomoyo_realpath() except that the pathname is already solved. */
-char *tomoyo_realpath_from_path(struct path *path);
-
-/* Check memory quota. */
-bool tomoyo_memory_ok(void *ptr);
-
-/*
- * Keep the given name on the RAM.
- * The RAM is shared, so NEVER try to modify or kfree() the returned name.
- */
-const struct tomoyo_path_info *tomoyo_get_name(const char *name);
-
-/* Check for memory usage. */
-int tomoyo_read_memory_counter(struct tomoyo_io_buffer *head);
-
-/* Set memory quota. */
-int tomoyo_write_memory_quota(struct tomoyo_io_buffer *head);
-
-/* Initialize realpath related code. */
-void __init tomoyo_realpath_init(void);
-
-/*
- * tomoyo_name_entry is a structure which is used for linking
- * "struct tomoyo_path_info" into tomoyo_name_list .
- */
-struct tomoyo_name_entry {
- struct list_head list;
- atomic_t users;
- struct tomoyo_path_info entry;
-};
-
-static inline void tomoyo_put_name(const struct tomoyo_path_info *name)
-{
- if (name) {
- struct tomoyo_name_entry *ptr =
- container_of(name, struct tomoyo_name_entry, entry);
- atomic_dec(&ptr->users);
- }
-}
-
-#endif /* !defined(_SECURITY_TOMOYO_REALPATH_H) */