search for: check_path

Displaying 14 results from an estimated 14 matches for "check_path".

2005 Jan 05
1
[PATCH] kinit/kinit.c
A patch for a few more hiccups and trivialities in kinit.c: * The check_path() calls check for "/root" and "/old_root" - I believe that should be "/root" and "/root/old_root". * chdir("/") is recommended after pivot_root() * init_argv[0] isn't set properly to the basename pointed to by char *s - this fix also eliminate...
2012 Jan 09
3
[PATCH 1/3] launch: move the filename checking to a wrapper
...m> --- src/launch.c | 18 ++++++++++++------ 1 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/launch.c b/src/launch.c index ca89b63..8eaaac8 100644 --- a/src/launch.c +++ b/src/launch.c @@ -277,6 +277,16 @@ valid_format_iface (const char *str) return 1; } +static int +check_path (guestfs_h *g, const char *filename) +{ + if (strchr (filename, ',') != NULL) { + error (g, _("filename cannot contain ',' (comma) character")); + return 1; + } + return 0; +} + int guestfs__add_drive_opts (guestfs_h *g, const char *filename,...
2012 Apr 12
5
[PATCH 0/4] libguestfs cannot open disk images which are symlinks to files that contain ':' (colon) character (RHBZ#812092).
...how_bug.cgi?id=812092 This patch set attempts to fix the problem conservatively, because it's a very high risk codepath and very late in the development of RHEL 6.3. The first patch reverts the behaviour of calling realpath(3) and checking for duplicate filenames. The second patch fixes 'check_path'. Only ':' is not permitted in qemu paths. (However symlinks to paths that contain ':' will work again because the first patch was reverted.) The third patch adds proper escaping of ',' in qemu command line parameters. The fourth patch adds a regression test for file...
2006 Mar 22
1
[patch] trivial cleanup
...0 @@ -191,7 +191,7 @@ } } else if (!S_ISDIR(st.st_mode)) { - fprintf(stderr, "NFS-Root: '%s' not a directory\n", path); + fprintf(stderr, "%s: '%s' not a directory\n", progname, path); exit(1); } } @@ -276,8 +276,6 @@ check_path("/root"); do_mounts(cmdc, cmdv); - /* do_mounts cd's to /root so below tests /root/old_root */ - check_path("old_root"); if (mnt_procfs == 1) umount2("/proc", 0);
2020 Oct 06
0
Viewing changelog for packages to be updated
...7 2020 Benjamin Marzinski <bmarzins at redhat.com> 0.8.3-3.2 - Bump release number for rebuild - Resolves: bz #1856944 * Wed Jul 15 2020 Benjamin Marzinski <bmarzins at redhat.com> 0.8.3-3.1 - Add 0020-libmultipath-make-dm_get_map-status-return-codes-sym.patch - Add 0021-multipathd-fix-check_path-errors-with-removed-map.patch * The above 2 patches fix bz #1856944. multipathd handles external device removal better. - Resolves: bz #1856944
2010 Apr 28
1
[PATCH] RFC: Running initscripts from kinit
...quot;%s/%s", INITD, names[i]); + system(buf); + } +out: + for (i = 0; i < used_count; i++) + free(names[i]); + free(names); + closedir(dir); +} + /* This is the argc and argv we pass to init */ const char *init_path; int init_argc; @@ -288,6 +356,8 @@ int main(int argc, char *argv[]) check_path("/root"); do_mounts(cmdc, cmdv); + do_runscripts(); + if (mnt_procfs) { umount2("/proc", 0); mnt_procfs = 0; -- 1.7.0.1
2020 Aug 27
2
Viewing changelog for packages to be updated
On Wed, Aug 26, 2020 at 11:18 PM Simon Matter via CentOS <centos at centos.org> wrote: > > > On Wed, Aug 26, 2020 at 2:54 PM Kenneth Porter <shiva at sewingwitch.com> > > wrote: > >> > >> Is there some way to see the RPM changelog entries for a prospective yum > >> update? Ideally I'd like to see just the entries that are newer than the
2012 May 04
2
[PATCH] run-init: add drop_capabilities support
...+#define KINIT_CAPABILITIES_H + +int drop_capabilities(const char *caps); + +#endif /* KINIT_CAPABILITIES_H */ diff --git a/usr/kinit/kinit.c b/usr/kinit/kinit.c index 8ea0da5..523c92b 100644 --- a/usr/kinit/kinit.c +++ b/usr/kinit/kinit.c @@ -284,8 +284,6 @@ int main(int argc, char *argv[]) check_path("/root"); do_mounts(cmdc, cmdv); - drop_capabilities(get_arg(cmdc, cmdv, "drop_capabilities=")); - if (mnt_procfs) { umount2("/proc", 0); mnt_procfs = 0; @@ -305,7 +303,9 @@ int main(int argc, char *argv[]) init_argv[0] = strrchr(init_path, '/')...
2011 Aug 03
1
[PATCH v2] kinit: Add drop_capabilities support.
...quot;,", &saveptr); + } + + if (drop_setpcap) + drop_capability(CAP_SETPCAP); + + free(s); + return 0; +} diff --git a/usr/kinit/kinit.c b/usr/kinit/kinit.c index 4a1f40b..098873b 100644 --- a/usr/kinit/kinit.c +++ b/usr/kinit/kinit.c @@ -288,6 +288,8 @@ int main(int argc, char *argv[]) check_path("/root"); do_mounts(cmdc, cmdv); + drop_capabilities(get_arg(cmdc, cmdv, "drop_capabilities=")); + if (mnt_procfs) { umount2("/proc", 0); mnt_procfs = 0; diff --git a/usr/kinit/kinit.h b/usr/kinit/kinit.h index c2e67b7..85960d8 100644 --- a/usr/kinit/kinit....
2011 Aug 03
2
[PATCH v3 0/2] Support drop directories directly from kinit
This patchset applies to klibc mainline. This patchset introduces the ability to kinit to execute scripts or executable files present in in the initramfs before switching over to the root filesystem. This functionality is implemented in a newly introduced run_parts() call, which calls scandir() to iterate through files which in then executes in sequence. run_parts() is also available as a
2011 Aug 02
6
[PATCH v2 0/4] Support drop directories directly from kinit
This patchset applies to klibc mainline. This patchset introduces the ability to kinit to execute scripts or executable files present in in the initramfs before switching over to the root filesystem. It is implemented by first implementing scandir() and alphasort() as present in POSIX.1-2008 in klibc itself, and then using that as the basis for iterating and executing files via a run_scripts()
2011 Jul 08
4
[PATCH 0/4] usr/kinit checkpatch
Various coding style fixes checkpatch warns about. The goal is not to be 100% checkpatch compliant, but to have more consistent coding style. As this is a trivial patch serie, will land in 24 hours in klibc git, unless of course ml review hits a bugger. Checked with size(3) that the generated kinit, fstype, ipconfig and nfsmount are the same. maximilian attems (4): [klibc] ipconfig: reduce
2011 Jul 29
3
[PATCH 1/3] klibc: Add scandir() and alphasort() support.
Add support for scandir() and alphasort() as defined in POSIX.1-2008. Signed-off-by: Mike Waychison <mikew at google.com> --- usr/include/dirent.h | 7 +++++ usr/klibc/Kbuild | 2 + usr/klibc/scandir.c | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 84 insertions(+), 1 deletions(-) create mode 100644 usr/klibc/scandir.c diff --git
2011 Jul 13
9
[PATCH 0/8] switch_root() enhancements
On a train ride to Bruxelles, brought out my axe and directly attacked run_init(8). run_init(8) is dead, long live switch_root(8). The next run on switch_root(8) involves fdopendir, so another push for the upcoming stdio 1.6 branch. The following is boot tested with initramfs-tools, kinit(8) tests would very much be appreciated!? Michal Suchanek (1): [klibc] switch_root: Fix single file