diff options
author | Rob Landley <rob@landley.net> | 2015-05-18 02:00:43 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2015-05-18 02:00:43 -0500 |
commit | c565b06325960a16ebf44afd8ae73f363775e58d (patch) | |
tree | bb728c44d52b9e2dfcbcc4bd1ad58d9fc73c78d5 /lib/portability.h | |
parent | f25d4954a786c9f564a5e30e5899c1adf2b6c655 (diff) | |
download | toybox-c565b06325960a16ebf44afd8ae73f363775e58d.tar.gz |
More ls -Z upgrading. Move TOYBOX_SELINUX and TOYBOX_SMACK support from
portability.h to new lib/lsm.h. Update ls.c to use it.
Fix "ls . toys" (two directories when one is . or ..), which was filtering
out the . as something we shouldn't recurse into even though it was explicitly
listed on the command line. For some reason "ls -Z . toys" is still segfaulting
though (but "ls -Z ." isn't), need to figure out why...
Diffstat (limited to 'lib/portability.h')
-rw-r--r-- | lib/portability.h | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/lib/portability.h b/lib/portability.h index aa1ee488..f83cab60 100644 --- a/lib/portability.h +++ b/lib/portability.h @@ -225,6 +225,10 @@ ssize_t getline(char **lineptr, size_t *n, FILE *stream); #define O_NOFOLLOW 0 #endif +#ifndef O_NOATIME +#define O_NOATIME 01000000 +#endif + #ifndef O_CLOEXEC #define O_CLOEXEC 02000000 #endif @@ -247,24 +251,3 @@ pid_t xfork(void); //#define strncpy(...) @@strncpyisbadmmkay@@ //#define strncat(...) @@strncatisbadmmkay@@ -#if CFG_TOYBOX_SELINUX -#include <selinux/selinux.h> -#else -#define is_selinux_enabled() 0 -int getcon(void* con); -#endif - -#if CFG_TOYBOX_SMACK -#include <sys/smack.h> -#include <sys/xattr.h> -#include <linux/xattr.h> -#else -#define smack_new_label_from_path(...) (-1) -#define smack_set_label_for_path(...) (-1) -#define smack_set_label_for_self(...) (-1) -#define XATTR_NAME_SMACK "" -#define SMACK_LABEL_LEN (1) /* for just ? */ - -ssize_t fgetxattr (int fd, char *name, void *value, size_t size); -#endif - |