Displaying 20 results from an estimated 22 matches for "guestfs_set_selinux".
Did you mean:
guestfs_get_selinux
2016 Jul 13
0
[PATCH 5/5] lib: Deprecate old SELinux APIs, rewrite SELinux documentation.
...ot;
" -w|--rw Mount read-write\n"
@@ -267,8 +267,7 @@ main (int argc, char *argv[])
" to the PID of the remote process"));
}
} else if (STREQ (long_options[option_index].name, "selinux")) {
- if (guestfs_set_selinux (g, 1) == -1)
- exit (EXIT_FAILURE);
+ /* nothing */
} else if (STREQ (long_options[option_index].name, "keys-from-stdin")) {
keys_from_stdin = 1;
} else if (STREQ (long_options[option_index].name, "progress-bars")) {
diff --git a/fish/gues...
2016 Jul 14
0
[PATCH v2 6/7] lib: Deprecate old SELinux APIs, rewrite SELinux documentation.
...ot;
" -w|--rw Mount read-write\n"
@@ -267,8 +267,7 @@ main (int argc, char *argv[])
" to the PID of the remote process"));
}
} else if (STREQ (long_options[option_index].name, "selinux")) {
- if (guestfs_set_selinux (g, 1) == -1)
- exit (EXIT_FAILURE);
+ /* nothing */
} else if (STREQ (long_options[option_index].name, "keys-from-stdin")) {
keys_from_stdin = 1;
} else if (STREQ (long_options[option_index].name, "progress-bars")) {
diff --git a/fish/gues...
2016 Jul 13
6
[PATCH 0/5] Fix SELinux
We can use the setfiles(8) command to relabel the guest filesystem,
even though we don't have a policy loaded nor SELinux enabled in the
appliance kernel.
This also deprecates or removes the old and broken SELinux support.
This patch isn't quite complete - I would like to add some tests to
the new API. I'm posting here to garner early feedback.
Rich.
2015 May 26
6
[PATCH 0/6] Update the way that API versions are generated for the man page.
The existing mechanism was clunky, slow and used ~ 10 MB of
local disk.
Rich.
2016 Jun 01
2
[PATCH v2] rescue: add --autosysroot option RHBZ#1183493
--autosysroot option uses suggestions to user on how to mount filesystems
and change root suggested by --suggest option in virt-rescue.
Commands are passed on kernel command line in format
guestfs_command=command;. Command ends with a semicolon and there can be
multiple commands specified. These are executed just before bash starts.
On successfull run user is presented directly with bash in
2016 Jul 14
10
[PATCH v2 0/7] Fix SELinux
v1 -> v2:
- Add simple test of the setfiles API.
- Use SELinux_relabel module in virt-v2v (instead of touch /.autorelabel).
- Small fixes.
Rich.
2016 Jun 01
0
[PATCH v2] rescue: add --autosysroot option RHBZ#1183493
...);
- if (g == NULL)
- error (EXIT_FAILURE, errno, "guestfs_create");
+ option_index = 0;
+ optind = 0;
for (;;) {
c = getopt_long (argc, argv, options, long_options, &option_index);
if (c == -1) break;
@@ -150,7 +152,9 @@ main (int argc, char *argv[])
if (guestfs_set_selinux (g, 1) == -1)
exit (EXIT_FAILURE);
} else if (STREQ (long_options[option_index].name, "append")) {
- append = optarg;
+ append = strdup (optarg);
+ } else if (STREQ (long_options[option_index].name, "autosysroot")) {
+ autosysroot = 1;...
2016 May 24
1
[PATCH] rescue: add --autosysroot option RHBZ#1183493
--autosysroot option uses suggestions to user on how to mount filesystems
and change root suggested by --suggest option in virt-rescue.
Commands are passed on kernel command line in format
guestfs_command=command;. Command ends with a semicolon and there can be
multiple commands specified. These are executed just before bash starts.
On successfull run user is presented directly with bash in
2009 Sep 09
2
[PATCH] Add command trace functionality
..._trace (handle, 1)>.
+
=item TMPDIR
Location of temporary directory, defaults to C</tmp>.
diff --git a/src/generator.ml b/src/generator.ml
index 765cb16..6184890 100755
--- a/src/generator.ml
+++ b/src/generator.ml
@@ -805,6 +805,32 @@ is passed to the appliance at boot time. See C<guestfs_set_selinux>.
For more information on the architecture of libguestfs,
see L<guestfs(3)>.");
+ ("set_trace", (RErr, [Bool "trace"]), -1, [FishAlias "trace"],
+ [InitNone, Always, TestOutputTrue (
+ [["set_trace"; "true"];
+ ["...
2016 Jun 09
2
Re: [PATCH v2] rescue: add --autosysroot option RHBZ#1183493
...ILURE, errno, "guestfs_create");
>
> + option_index = 0;
> + optind = 0;
> for (;;) {
> c = getopt_long (argc, argv, options, long_options, &option_index);
> if (c == -1) break;
> @@ -150,7 +152,9 @@ main (int argc, char *argv[])
> if (guestfs_set_selinux (g, 1) == -1)
> exit (EXIT_FAILURE);
> } else if (STREQ (long_options[option_index].name, "append")) {
> - append = optarg;
> + append = strdup (optarg);
> + } else if (STREQ (long_options[option_index].name, "autosysroot")) {...
2010 Aug 28
4
[PATCH 0/4] Add progress bars
As discussed previously:
https://www.redhat.com/archives/libguestfs/2010-July/msg00003.html
https://www.redhat.com/archives/libguestfs/2010-July/msg00024.html
To do:
(1) Implement progress notifications for many more daemon operations.
(2) OCaml bindings to the callback.
(3) Perl bindings to the callback.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
2016 Jun 16
0
Re: [PATCH v2] rescue: add --autosysroot option RHBZ#1183493
...ot;);
>>
>> + option_index = 0;
>> + optind = 0;
>> for (;;) {
>> c = getopt_long (argc, argv, options, long_options, &option_index);
>> if (c == -1) break;
>> @@ -150,7 +152,9 @@ main (int argc, char *argv[])
>> if (guestfs_set_selinux (g, 1) == -1)
>> exit (EXIT_FAILURE);
>> } else if (STREQ (long_options[option_index].name, "append")) {
>> - append = optarg;
>> + append = strdup (optarg);
>> + } else if (STREQ (long_options[option_index].name, "...
2014 May 26
2
[PATCH 2/2] Use setfiles from the appliance for the SELinux relabel (RHBZ#1089100).
...SELinux relabel of the files";
longdesc = "\
This does a relabel of the files of the system under the specified
C<root> according to the SELinux policy in the system mounted in that
C<root>.
+I<Note:> the relabel does not work when SELinux is enabled (see
+C<guestfs_set_selinux>), as the kernel and the policy in the
+appliance might not be compatible with the policy found inside the
+guest mounted at C<root>; hence, this function will error out in this
+case.
+
See the documentation about SELINUX in L<guestfs(3)>." };
]
--
1.9.3
2009 Aug 24
5
[0/5] guestfish: detect stdout-write failure
Nearly any program that writes to standard output can
benefit from this sort of fix.
Without it, running e.g., ./guestfish --version > /dev/full
would exit successfully, even though it got ENOSPC
when writing to the full device. That means regular
output redirected to a file on a full partition may also
fail to be written, and the error ignored.
Before:
$ guestfish --version >
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
2009 Nov 09
1
use STREQ(a,b), not strcmp(a,b) == 0
...a number: %s\n"),
@@ -233,7 +233,7 @@ main (int argc, char *argv[])
exit (1);
}
}
- } else if (strcmp (long_options[option_index].name, "selinux") == 0) {
+ } else if (STREQ (long_options[option_index].name, "selinux")) {
guestfs_set_selinux (g, 1);
} else {
fprintf (stderr, _("%s: unknown long option: %s (%d)\n"),
@@ -755,7 +755,7 @@ cmdline (char *argv[], int optind, int argc)
if (optind >= argc) return;
cmd = argv[optind++];
- if (strcmp (cmd, ":") == 0) {
+ if (STREQ (cmd, ":&quo...
2016 Aug 08
0
ANNOUNCE: libguestfs 1.34 released
..."
"part_set_disk_guid_random"
Get and set the GPT disk GUID, or set it to a fresh random value
(Maxim Perevedentsev).
"selinux_relabel"
SELinux-relabel part or all of the guest filesystem.
Other API changes
"guestfs_set_selinux", "guestfs_get_selinux", "guestfs_setcon",
"guestfs_getcon" and "guestfs_llz" have been deprecated. Use the new
API "guestfs_selinux_relabel" to relabel filesystems. Use
"guestfs_lgetxattrs" to list the "se...
2014 Nov 26
5
[PATCH] tools: implement --short-options
...].name, "long-options"))
display_long_options (long_options);
+ else if (STREQ (long_options[option_index].name, "short-options"))
+ display_short_options (options);
else if (STREQ (long_options[option_index].name, "selinux")) {
if (guestfs_set_selinux (g, 1) == -1)
exit (EXIT_FAILURE);
diff --git a/resize/resize.ml b/resize/resize.ml
index f54b11f..363e2b6 100644
--- a/resize/resize.ml
+++ b/resize/resize.ml
@@ -194,6 +194,7 @@ let main () =
"--no-extra-partition", Arg.Clear extra_partition, " " ^ s_"Do...
2010 Aug 31
13
[PATCH v2] Add progress bars
This is an updated and extended version of the original patch:
https://www.redhat.com/archives/libguestfs/2010-August/msg00163.html
This adds OCaml and Perl bindings (both tested), support for
progress bars in virt-resize, and adds progress notifications
to a number of the simpler commands.
Still to do is to add progress messages to more commands. There
are still a few commands which would be
2016 Apr 04
0
[PATCH 2/2] Use 'error' function for fprintf followed by exit.
...e_control) != 1)
+ error (EXIT_FAILURE, 0,
+ _("remote: $GUESTFISH_PID must be set"
+ " to the PID of the remote process"));
}
} else if (STREQ (long_options[option_index].name, "selinux")) {
if (guestfs_set_selinux (g, 1) == -1)
@@ -291,11 +285,10 @@ main (int argc, char *argv[])
exit (EXIT_FAILURE);
} else if (STREQ (long_options[option_index].name, "no-dest-paths")) {
complete_dest_paths = 0;
- } else {
- fprintf (stderr, _("%s: unknown long option: %s (...