Displaying 7 results from an estimated 7 matches for "do_sh".
2009 Aug 17
13
total warning-removal for daemon/
The warnings in daemon were aggravating and risky
for development (too easy to miss new ones) so I spent some
time last week and today working on removing them.
The first patch gets us down to almost no warnings with
the original -Wall setting. That was by far the hardest part.
Once I'd done that, I enabled nearly all of gcc's warnings via
gnulib's warnings and manywarnings modules
2016 Jan 21
0
[PATCH v3 1/6] daemon: Rename daemon/command.c -> daemon/sh.c.
...-
-char **
-do_command_lines (char *const *argv)
-{
- CLEANUP_FREE char *out = NULL;
- char **lines;
-
- out = do_command (argv);
- if (out == NULL)
- return NULL;
-
- lines = split_lines (out);
-
- if (lines == NULL)
- return NULL;
-
- return lines; /* Caller frees. */
-}
-
-char *
-do_sh (const char *cmd)
-{
- const char *argv[] = { "/bin/sh", "-c", cmd, NULL };
-
- return do_command ((char **) argv);
-}
-
-char **
-do_sh_lines (const char *cmd)
-{
- const char *argv[] = { "/bin/sh", "-c", cmd, NULL };
-
- return do_command_lines ((char *...
2014 May 24
9
SELinux relabel API
[
I realized that we were discussing adding this feature, in various
private email, IRC, and this long bugzilla thread:
https://bugzilla.redhat.com/show_bug.cgi?id=1060423
That's not how we should do things. Let's discuss it on the
mailing list.
]
One thing that virt-customize/virt-sysprep/virt-builder have to do is
relabel SELinux guests.
What we do at the moment
2014 May 26
2
[PATCH 2/2] Use setfiles from the appliance for the SELinux relabel (RHBZ#1089100).
...&cmd, cmd_fmt, len, root, len, root) == -1) {
- reply_with_perror ("asprintf");
+ if (has_selinux_mountpoint () > 0) {
+ reply_with_error ("cannot work when SELinux is enabled in the "
+ "appliance\n");
return -1;
}
- out = do_sh (cmd);
+ len = length_without_training_slash (root);
+
+ if (asprintf (&selinux_config, "%s%.*s/etc/selinux/config",
+ sysroot, len, root) == -1) {
+ if (verbose)
+ fprintf (stderr, "asprintf/selinux_config failed\n");
+ goto do_autorelabel;
+ }...
2009 Aug 12
23
[PATCH 0/23] factor and const-correctness
This started as a simple warning-elimination change.
I'll get back to that series shortly ;-)
It turned into a factorization and constification exercise
during which I got a taste of ocaml. Thanks to Rich Jones
for help with a few snippets in generator.ml.
The overall result is that many previously-manually-maintained
bits from daemon/*.c functions are now hoisted into the automatically-
2015 Dec 05
6
[PATCH 0/6 v2] [FOR COMMENTS ONLY] Rework inspection.
This is a more working version. Inspection (partially) succeeds on a
real guest this time :-)
You can test it out on a real guest (in this case, a CentOS disk image
located at /tmp/centos-6.img) by doing:
$ ./run guestfish -v -x -a /tmp/centos-6.img
><fs> run
><fs> debug sh "guestfs-inspection --verbose"
which will print lots of debugging, and at the end the
2016 Jan 21
8
[PATCH v3 0/6] [FOR COMMENTS ONLY] Rework inspection.
For background on this change, see:
https://rwmj.wordpress.com/2015/12/06/inspection-now-with-added-prolog/
v2 was previously posted here:
https://www.redhat.com/archives/libguestfs/2015-December/msg00038.html
To test this patch series on a real guest, you can do:
$ ./run guestfish -v -x -a /var/tmp/centos-6.img
><fs> run
><fs> debug sh "guestfs-inspection