search for: st_perm

Displaying 19 results from an estimated 19 matches for "st_perm".

Did you mean: set_perm
2015 Mar 25
2
[PATCH] customize: fix --upload to FAT partition
FAT doesn't support file ownership, so show warning instead of error. Fixes RHBZ#1196101 Maros Zatko (1): customize: fix --upload to FAT partition (RHBZ#1196101) customize/customize_run.ml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 1.9.3
2015 Mar 25
0
[PATCH] customize: fix --upload to FAT partition (RHBZ#1196101)
...| 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/customize/customize_run.ml b/customize/customize_run.ml index dbb77df..306b7f2 100644 --- a/customize/customize_run.ml +++ b/customize/customize_run.ml @@ -290,7 +290,10 @@ exec >>%s 2>&1 let perms = statbuf.st_perm land 0o7777 (* sticky & set*id *) in g#chmod perms dest; let uid, gid = statbuf.st_uid, statbuf.st_gid in - g#chown uid gid dest + let chown () = + try g#chown uid gid dest + with Guestfs.Error e -> warning "%s" e in + chown () | `W...
2015 Mar 26
2
[PATCH v3] customize: fix --upload to FAT partition (RHBZ#1196101)
Some filesystems, such as FAT doesn't support file ownership, so show warning instead of error on EPERM. Maros Zatko (1): customize: fix --upload to FAT partition (RHBZ#1196101) customize/customize_run.ml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) -- 1.9.3
2015 Mar 25
2
[PACTH v2] customize: fix --upload to FAT partition
FAT doesn't support file ownership, so show warning instead of error. Fixes RHBZ#1196101 Maros Zatko (1): customize: fix --upload to FAT partition (RHBZ#1196101) customize/customize_run.ml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) -- 1.9.3
2015 Mar 25
1
[PACTH v2] customize: fix --upload to FAT partition (RHBZ#1196101)
...ions(+), 2 deletions(-) diff --git a/customize/customize_run.ml b/customize/customize_run.ml index dbb77df..40d19ac 100644 --- a/customize/customize_run.ml +++ b/customize/customize_run.ml @@ -289,8 +289,20 @@ exec >>%s 2>&1 let statbuf = stat path in let perms = statbuf.st_perm land 0o7777 (* sticky & set*id *) in g#chmod perms dest; - let uid, gid = statbuf.st_uid, statbuf.st_gid in - g#chown uid gid dest + + (* Check if target resides on FAT filesystem and then don't change + * ownership + *) + let mps = List.map (fun (dev,...
2015 Mar 26
0
[PATCH v3] customize: fix --upload to FAT partition (RHBZ#1196101)
...+++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/customize/customize_run.ml b/customize/customize_run.ml index dbb77df..f2dbaa2 100644 --- a/customize/customize_run.ml +++ b/customize/customize_run.ml @@ -290,7 +290,13 @@ exec >>%s 2>&1 let perms = statbuf.st_perm land 0o7777 (* sticky & set*id *) in g#chmod perms dest; let uid, gid = statbuf.st_uid, statbuf.st_gid in - g#chown uid gid dest + let chown () = + try g#chown uid gid dest + with Guestfs.Error m as e -> + if g#last_errno () = Guestfs.Errno.errn...
2011 Sep 12
1
[PATCH] febootstrap: Use contents of installed Debian packages instead of downloading and unpacking them.
...#39; && l.[1] != '.' + ) lines in + let files = List.map ( + fun path -> + let statbuf = lstat path in + let is_dir = statbuf.st_kind = S_DIR in + let config = statbuf.st_kind = S_REG && string_prefix "/etc/" path in + let mode = statbuf.st_perm in + (path, { ft_dir = is_dir; ft_config = config; ft_mode = mode; + ft_ghost = false; ft_size = statbuf.st_size }) + ) lines in + files + +let debian_list_files pkg = + if List.exists ((=) pkg) installed_pkgs then + debian_list_files_installed pkg + else + debian_list_files_d...
2014 Oct 21
3
Re: [PATCH v5 1/7] tests: Introduce test harness for running tests.
...rning: Install OCaml compiler in order to rebuild the test-harness.' > $@-t > + chmod +x $@-t > + mv $@-t $@ > + > endif I guess this needs a configure check to disable the test suite when OCaml is not present. > +let is_executable path = > + try (stat path).st_perm land 0o111 <> 0 > + with Unix_error _ -> false I guess Unix.access might be better here. > +let relative_path_to_absolute path = > + let cmd = sprintf "unset CDPATH; cd %s && pwd" (Filename.quote path) in > + let chan = open_process_in cmd in > + let...
2014 Oct 03
0
[PATCH v3] tests: Introduce test harness for running tests.
...Unix +open Printf + +open Types +open Tests + +let (//) = Filename.concat + +let is_dir path = + try (stat path).st_kind = S_DIR + with Unix_error _ -> false + +let is_file path = + try (stat path).st_kind = S_REG + with Unix_error _ -> false + +let is_executable path = + try (stat path).st_perm land 0o111 <> 0 + with Unix_error _ -> false + +let relative_path_to_absolute path = + let cmd = sprintf "unset CDPATH; cd %s && pwd" (Filename.quote path) in + let chan = open_process_in cmd in + let path = input_line chan in + (match close_process_in chan with + |...
2014 Feb 25
2
[PATCH supermin v4] Supermin 5 rewrite.
...fun path -> + let st = lstat path in + if st.st_kind = S_DIR then Some (path, st) else None + ) files in + List.iter ( + fun (path, st) -> + let opath = outputdir // path in + (try chown opath st.st_uid st.st_gid with Unix_error _ -> ()); + (try chmod opath st.st_perm with Unix_error _ -> ()) + ) (List.rev dirs) diff --git a/src/config.ml.in b/src/config.ml.in index fe7cda3..0995b99 100644 --- a/src/config.ml.in +++ b/src/config.ml.in @@ -1,5 +1,5 @@ -(* supermin 4 - * Copyright (C) 2009-2013 Red Hat Inc. +(* supermin 5 + * Copyright (C) 2009-2014 Red Hat In...
2014 Oct 05
0
[PATCH v5 1/7] tests: Introduce test harness for running tests.
...ves.stdout) () = + if isatty then output_string chan "\x1b[0m" + +let is_dir path = + try (stat path).st_kind = S_DIR + with Unix_error _ -> false + +let is_file path = + try (stat path).st_kind = S_REG + with Unix_error _ -> false + +let is_executable path = + try (stat path).st_perm land 0o111 <> 0 + with Unix_error _ -> false + +let relative_path_to_absolute path = + let cmd = sprintf "unset CDPATH; cd %s && pwd" (Filename.quote path) in + let chan = open_process_in cmd in + let path = input_line chan in + (match close_process_in chan with + |...
2015 May 29
0
[PATCH v3] RFC: New virt-dib tool
..., p) -> + let listing = Array.to_list (Sys.readdir p) in + let scripts = List.filter valid_script_name listing in + let scripts = List.filter ( + fun x -> + try + let s = Unix.stat (p // x) in + s.Unix.st_kind = Unix.S_REG && s.Unix.st_perm land 0o111 > 0 + with Unix.Unix_error _ -> false + ) scripts in + if scripts <> [] then + Hashtbl.add hooks hook scripts + ) entries; + hooks + +let load_elements ~debug paths = + let loaded_elements = Hashtbl.create 13 in + let paths = List.filter is_direc...
2015 Jul 03
1
[PATCH v5] New tool: virt-dib
..., p) -> + let listing = Array.to_list (Sys.readdir p) in + let scripts = List.filter valid_script_name listing in + let scripts = List.filter ( + fun x -> + try + let s = Unix.stat (p // x) in + s.Unix.st_kind = Unix.S_REG && s.Unix.st_perm land 0o111 > 0 + with Unix.Unix_error _ -> false + ) scripts in + if scripts <> [] then + Hashtbl.add hooks hook scripts + ) entries; + hooks + +let load_elements ~debug paths = + let loaded_elements = Hashtbl.create 13 in + let paths = List.filter is_direc...
2015 Mar 31
0
[PATCH] WIP: New virt-dib tool
...ook_dir in + let entries = Array.to_list (Sys.readdir hook_dir) in + let entries = List.filter (fun x -> is_string_valid x) entries in + let entries = List.filter ( + fun x -> + try + let s = Unix.stat (hook_dir // x) in + s.Unix.st_kind = Unix.S_REG && s.Unix.st_perm land 0o111 > 0 + with Unix.Unix_error _ -> false + ) entries in + let entries = List.sort digit_prefix_compare entries in + if dryrun then ( + List.iter (fun x -> msg (f_"Would run: %s/%s") hook_name x) entries + ) else ( + let timings = Hashtbl.create 13 in + L...
2014 Mar 18
2
[PATCH] customize: Move virt-customize-related code to a separate
There's not going to be an easy way to present this patch. It's huge and interconnected. Anyway, what it does is lay the groundwork for a new tool which I'm calling 'virt-customize'. virt-customize is virt-builder, but without the part where it downloads a template from a respository. Just the part where it customizes the template, that is, installing packages, editing
2015 Jun 16
2
[PATCH v4] RFC: New tool: virt-dib
..., p) -> + let listing = Array.to_list (Sys.readdir p) in + let scripts = List.filter valid_script_name listing in + let scripts = List.filter ( + fun x -> + try + let s = Unix.stat (p // x) in + s.Unix.st_kind = Unix.S_REG && s.Unix.st_perm land 0o111 > 0 + with Unix.Unix_error _ -> false + ) scripts in + if scripts <> [] then + Hashtbl.add hooks hook scripts + ) entries; + hooks + +let load_elements ~debug paths = + let loaded_elements = Hashtbl.create 13 in + let paths = List.filter is_direc...
2014 Oct 05
12
[PATCH v5 0/7] tests: Introduce test harness for running tests.
Since v4: - More tests have been converted. - Testing local guests fixed. - Drop no-exec-stack test.
2014 Oct 04
4
[PATCH v4 0/4] tests: Introduce test harness for running tests.
This converts more of the tests (basically everything under tests/) to use the test harness, revealing some problems which have subsequently been fixed. Rich.
2014 Oct 23
10
[PATCH v6 00/10] tests: Introduce test harness for running tests.
For v6: This is mainly just a rebase, but I have also added tests in the ocaml/ language bindings directory, and for all the OCaml-written virt tools. Rich.