diff options
-rw-r--r-- | daemon/ls.c | 26 | ||||
-rw-r--r-- | generator/generator_actions.ml | 9 | ||||
-rw-r--r-- | src/MAX_PROC_NR | 2 |
3 files changed, 36 insertions, 1 deletions
diff --git a/daemon/ls.c b/daemon/ls.c index d0c7b523..1df0b6a2 100644 --- a/daemon/ls.c +++ b/daemon/ls.c @@ -102,3 +102,29 @@ do_ll (const char *path) free (err); return out; /* caller frees */ } + +char * +do_llz (const char *path) +{ + int r; + char *out, *err; + char *spath; + + spath = sysroot_path (path); + if (!spath) { + reply_with_perror ("malloc"); + return NULL; + } + + r = command (&out, &err, "ls", "-laZ", spath, NULL); + free (spath); + if (r == -1) { + reply_with_error ("%s", err); + free (out); + free (err); + return NULL; + } + + free (err); + return out; /* caller frees */ +} diff --git a/generator/generator_actions.ml b/generator/generator_actions.ml index 3a7be795..f9ba5c39 100644 --- a/generator/generator_actions.ml +++ b/generator/generator_actions.ml @@ -6651,6 +6651,15 @@ This option may not be specified at the same time as the C<correct> option. =back"); + ("llz", (RString "listing", [Pathname "directory"], []), 305, [], + [], + "list the files in a directory (long format with SELinux contexts)", + "\ +List the files in C<directory> in the format of 'ls -laZ'. + +This command is mostly useful for interactive sessions. It +is I<not> intended that you try to parse the output string."); + ] let all_functions = non_daemon_functions @ daemon_functions diff --git a/src/MAX_PROC_NR b/src/MAX_PROC_NR index 873b744b..67d04b9f 100644 --- a/src/MAX_PROC_NR +++ b/src/MAX_PROC_NR @@ -1 +1 @@ -304 +305 |