search for: copy_attributes

Displaying 20 results from an estimated 32 matches for "copy_attributes".

2014 Jan 14
0
[PATCH] builder, edit, fish: use copy-attributes
.../builder/perl_edit.ml b/builder/perl_edit.ml index aa4c2e6..28e5dea 100644 --- a/builder/perl_edit.ml +++ b/builder/perl_edit.ml @@ -42,7 +42,7 @@ let rec edit_file ~debug (g : Guestfs.guestfs) file expr = g#upload tmpfile file; (* However like virt-edit we do need to copy attributes. *) - copy_attributes g file_old file; + g#copy_attributes ~all:true file_old file; g#rm file_old and do_perl_edit ~debug g file expr = @@ -76,30 +76,3 @@ and do_perl_edit ~debug g file expr = ); Unix.rename (file ^ ".out") file - -and copy_attributes g src dest = - let has_linuxxattrs = g#feat...
2014 Nov 27
5
[PATCH 0/4] fix bad commit ids referenced in commit messages
Hi, This series fix two bad commit ids referenced in commit messages, by first reverting the two commits and then re-applying them with correct commit ids referenced. No big problem, but for clarity. Hu Tao (4): Revert "Update gobject/Makefile.inc and POTFILES" Revert "Update gobject/Makefile.inc and POTFILES" Update gobject/Makefile.inc and POTFILES Update
2014 Jan 07
8
RFC: copy-attributes command
Hi, attached there is a prototype of patch for adding a new copy-attributes command. Such command would allow copy the attributes of a "file" to another, so for example in guestfish: copy-attributes foo bar permissions:true xattributes:false would only copy the permissions of foo to bar, not copying its extended attributes too. Just few notes: - my first daemon command, so
2014 Sep 29
2
[PATCH 1/2] builder, customize: disable SELinux
Having SELinux enabled (even if not enforcing) in the appliance causes troubles to applications/libraries that read/write SELinux attributes. --- builder/builder.ml | 6 +++++- customize/customize_main.ml | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/builder/builder.ml b/builder/builder.ml index a407924..5195cfd 100644 --- a/builder/builder.ml +++
2012 Feb 08
2
Fix virt-edit so it preserves permissions (RHBZ#788641)
The first patch preserves file mode, UID, GID and SELinux context across edited files. The second patch adds a useful new command in guestfish ('llz') which shows SELinux context (like 'ls -laZ') that was useful when debugging this. Rich.
2014 Sep 29
0
[PATCH 2/2] customize: fix attributes of /etc/shadow (RHBZ#1146275)
...| None -> default_crypto ~prog g root | Some c -> c in + (* Create a (almost) empty temporary file with the attributes of + * /etc/shadow, so we can restore them later. + *) + let tempfile = g#mktemp "/etc/shadow.guestfsXXXXXX" in + g#write tempfile "*"; + g#copy_attributes ~all:true "/etc/shadow" tempfile; + g#aug_init "/" 0; let users = Array.to_list (g#aug_ls "/files/etc/shadow") in List.iter ( @@ -116,9 +123,11 @@ let rec set_linux_passwords ~prog ?password_crypto g root passwords = with Not_found -> () ) users;...
2012 Feb 10
3
[PATCH 0/3] Fix guestfish edit command.
This is a further, more comprehensive fix for https://bugzilla.redhat.com/show_bug.cgi?id=788641 The guestfish 'edit' command (aka 'emacs', 'vi') suffered from the same problems as virt-edit and more. It could have failed and left a partially overwritten file, and it didn't preserve permissions etc from the original file. These three patches fix all this. The first
2020 May 05
3
[PATCH libguestfs-common 1/2] mlcustomize: Refactor SELinux_relabel code.
...let old_specfile = specfile ^ "~" in - g#mv specfile old_specfile; - let content = g#read_file old_specfile in - let content = - String.replace content "vdagentd.\\pid" "vdagentd\\.pid" in - g#write specfile content; - g#copy_attributes ~all:true old_specfile specfile - ); + (* Use Augeas to parse /etc/selinux/config. *) + g#aug_init "/" (16+32) (* AUG_SAVE_NOOP | AUG_NO_LOAD *); + (* See: https://bugzilla.redhat.com/show_bug.cgi?id=975412#c0 *) + ignore (g#aug_rm "/augeas/load/*[\"/etc/selinux/config/...
2017 Mar 06
2
[PATCH v2] v2v: Fix invalid regexp in file_contexts file
v1 -> v2: Match more specifically. Rich.
2017 Mar 06
0
[PATCH v2] v2v: Fix invalid regexp in file_contexts file (RHBZ#1374232).
...let old_specfile = specfile ^ "~" in + g#mv specfile old_specfile; + let content = g#read_file old_specfile in + let content = + String.replace content "vdagentd.\\pid" "vgagentd\\.pid" in + g#write specfile content; + g#copy_attributes ~all:true old_specfile specfile + ); + (* Relabel everything. *) g#selinux_relabel ~force:true specfile "/"; diff --git a/v2v/virt-v2v.pod b/v2v/virt-v2v.pod index 3d0eada..a5b8e88 100644 --- a/v2v/virt-v2v.pod +++ b/v2v/virt-v2v.pod @@ -789,17 +789,6 @@ can install p...
2020 Sep 23
6
[common PATCH 0/3] SELinux_relabel: relabel only if enforcing (RHBZ#1828952)
Continuation/rework of: https://www.redhat.com/archives/libguestfs/2020-May/msg00020.html This is my approach, as I explained here: https://bugzilla.redhat.com/show_bug.cgi?id=1828952#c4 https://www.redhat.com/archives/libguestfs/2020-May/msg00035.html IOW: do not attempt to relabel if the guest is not enforcing, as it is either useless or may fail; few words more are in the comments of patch #3.
2012 May 02
4
[PATCH 0/4] fish: Allow the glob command to expand device patterns (RHBZ#635971).
This patch set fixes a two year old bug in guestfish, namely that the 'glob' command does not expand /dev/* patterns. https://bugzilla.redhat.com/show_bug.cgi?id=635971 Rich.
2017 Mar 06
2
[PATCH] v2v: Fix invalid regexp in file_contexts file (RHBZ#1374232).
...sion in %s" specfile; + let old_specfile = specfile ^ "~" in + g#mv specfile old_specfile; + let content = g#read_file old_specfile in + let content = String.replace content ".\\p" "\\.p" in + g#write specfile content; + g#copy_attributes ~all:true old_specfile specfile + ); + (* Relabel everything. *) g#selinux_relabel ~force:true specfile "/"; diff --git a/v2v/virt-v2v.pod b/v2v/virt-v2v.pod index 3d0eada..a5b8e88 100644 --- a/v2v/virt-v2v.pod +++ b/v2v/virt-v2v.pod @@ -789,17 +789,6 @@ can install p...
2002 Feb 27
2
2.2.3a printing problems: no printing from Word, spools taking up all CPU on clients
I'm running Samba-2.2.3a plus the printer defaults patch (samba-2.2.3a-5mdk rpm) on a Linux 2.4.(Mandrake 8.X). This server has been upgraded from 2.2.3, from 2.2.2, which was upgraded from 2.2.1. Everything was working with the same printer configuration at version 2.2.2 and 2.2.1 (although I have moved the WINS server from a new machine since then). The server is a PDC/WINS server, and
2015 Jun 25
0
[PATCH v2 1/9] build: Remove ./configure --enable-valgrind-daemon.
...se only)"; longdesc = "\ -This function is used internally when closing the appliance. Note -it's only called when ./configure --enable-valgrind-daemon is used." }; +This function is used internally when testing the appliance." }; { defaults with name = "copy_attributes"; added = (1, 25, 21); diff --git a/src/conn-socket.c b/src/conn-socket.c index 3ead48f..980d7df 100644 --- a/src/conn-socket.c +++ b/src/conn-socket.c @@ -343,26 +343,6 @@ handle_log_message (guestfs_h *g, /* It's an actual log message, send it upwards. */ guestfs_int_log_message_ca...
2015 Sep 29
1
[PATCH] [repost] build: Remove ./configure --enable-valgrind-daemon.
Previously posted here: https://www.redhat.com/archives/libguestfs/2015-June/msg00266.html Rich.
2014 Jan 13
0
[PATCH] New API: copy-attributes.
...#include "guestfs_protocol.h" #include "daemon.h" #include "actions.h" +#include "optgroups.h" GUESTFSD_EXT_CMD(str_file, file); GUESTFSD_EXT_CMD(str_zcat, zcat); @@ -584,3 +585,74 @@ do_filesize (const char *path) return buf.st_size; } + +int +do_copy_attributes (const char *src, const char *dest, int all, int mode, int xattributes, int ownership) +{ + int r; + struct stat srcstat, deststat; + + static const unsigned int file_mask = 07777; + + /* If it was specified to copy everything, manually enable all the flags + * not manually specified to avoid...
2014 Jan 07
0
Re: RFC: copy-attributes command
...on.h" > #include "actions.h" > +#include "optgroups.h" > > GUESTFSD_EXT_CMD(str_file, file); > GUESTFSD_EXT_CMD(str_zcat, zcat); > @@ -584,3 +585,46 @@ do_filesize (const char *path) > > return buf.st_size; > } > + > +int > +do_copy_attributes (const char *src, const char *dest, int permissions, int xattributes) > +{ > + int r; > + struct stat srcstat, deststat; > + > + CHROOT_IN; > + r = stat (src, &srcstat); > + CHROOT_OUT; > + > + if (r == -1) { > + reply_with_perror ("stat: %s", sr...
2014 Jan 10
4
Re: RFC: copy-attributes command
...uot; > > > > GUESTFSD_EXT_CMD(str_file, file); > > GUESTFSD_EXT_CMD(str_zcat, zcat); > > > > @@ -584,3 +585,46 @@ do_filesize (const char *path) > > > > return buf.st_size; > > > > } > > > > + > > +int > > +do_copy_attributes (const char *src, const char *dest, int > > permissions, int xattributes) +{ > > + int r; > > + struct stat srcstat, deststat; > > + > > + CHROOT_IN; > > + r = stat (src, &srcstat); > > + CHROOT_OUT; > > + > > + if (r == -1) { > &gt...
2015 Jun 23
10
[PATCH 0/7] Better testing of the guestfsd daemon.
Currently we are unable to properly run guestfsd (the daemon) under valgrind. Attempts to run valgrind inside the appliance have not been successful (see patch 1/7). However we desperately need better valgrind coverage of the daemon, particularly because it is doing a lot of complex parsing of program output. This has been a problem for a long time. A better way to attack this problem is to