search for: x_ok

Displaying 20 results from an estimated 92 matches for "x_ok".

Did you mean: r_ok
2018 Apr 08
0
Success : clang/LLVM-built host kernel and clang-built VMware kernel modules for VMware Player 14.1.1 on host Ubuntu 17.10 x86_64
..., st_size=0, ...}) = 0 read(11, "Linux version 4.16.0 (exp at exp) (gcc "..., 4096) = 106 read(11, "", 3072) = 0 close(11) = 0 write(10, "2018-04-07T00:37:09.944-07:00| v"..., 71) = 71 access("/sbin/gcc-7.3", X_OK) = -1 ENOENT (No such file or directory) access("/home/g/CodeSourcery/Sourcery_G++_Lite/bin/gcc-7.3", X_OK) = -1 ENOENT (No such file or directory) access("/home/g/bin/gcc-7.3", X_OK) = -1 ENOENT (No such file or directory) access("/home/g/.local/bin/gcc-7.3&q...
2014 Jun 12
2
[PATCH] fuse: UID 0 should override all permissions checks (RHBZ#1106548).
...GRP - : statbuf.st_mode & S_IROTH); - if (mask & W_OK) - ok = ok && - ( fuse->uid == statbuf.st_uid ? statbuf.st_mode & S_IWUSR - : fuse->gid == statbuf.st_gid ? statbuf.st_mode & S_IWGRP - : statbuf.st_mode & S_IWOTH); - if (mask & X_OK) - ok = ok && - ( fuse->uid == statbuf.st_uid ? statbuf.st_mode & S_IXUSR - : fuse->gid == statbuf.st_gid ? statbuf.st_mode & S_IXGRP - : statbuf.st_mode & S_IXOTH); + /* Root user should be able to access everything, so only bother + * with these f...
2024 Jan 14
2
ProxyJump may construct erroneous ProxyCommand
...sh.c b/ssh.c index 48d93ddf2..7cd498f84 100644 --- a/ssh.c +++ b/ssh.c @@ -1313,7 +1313,7 @@ main(int ac, char **av) * Try to use SSH indicated by argv[0], but fall back to * "ssh" if it appears unavailable. */ - if (strchr(argv0, '/') != NULL && access(argv0, X_OK) != 0) + if (access(argv0, X_OK) != 0) sshbin = "ssh"; /* Consistency check */
2015 Jun 23
2
[PATCH] daemon: Rewrite prog_exists so it uses the actual PATH, not hard-coded list.
...onst char * const dirs[] = - { "/sbin", "/usr/sbin", "/bin", "/usr/bin" }; - size_t i; - char buf[1024]; - - for (i = 0; i < sizeof dirs / sizeof dirs[0]; ++i) { - snprintf (buf, sizeof buf, "%s/%s", dirs[i], prog); - if (access (buf, X_OK) == 0) + const char *pathc = getenv ("PATH"); + + if (!pathc) + return 0; + + const char *elem; + char *saveptr; + size_t len = strlen (pathc) + 1; + char path[len]; + strcpy (path, pathc); + + elem = strtok_r (path, ":", &saveptr); + while (elem) { + size_t n...
2010 Nov 05
4
xe cli not working on remote machine
...7}, NULL) = 0 getppid()                               = 21994 getpid()                                = 21995 rt_sigaction(SIGPIPE, {SIG_IGN, [], 0}, {SIG_DFL, [], 0}, 8) = 0 rt_sigaction(SIGINT, {0x808dde7, [], 0}, {SIG_DFL, [], 0}, 8) = 0 access("/opt/xensource/libexec/stunnel/stunnel", X_OK) = -1 ENOENT (No such file or directory) access("/usr/sbin/stunnel4", X_OK)      = -1 ENOENT (No such file or directory) access("/usr/sbin/stunnel", X_OK)       = 0 open("/root/.xe", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) stat64("/var/xapi/v...
2019 Jan 11
3
[PATCH 1/3] mlstdutils: add a very simple test for Std_utils.which
--- common/mlstdutils/std_utils_tests.ml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/common/mlstdutils/std_utils_tests.ml b/common/mlstdutils/std_utils_tests.ml index 81f512cbf..f7b0247a4 100644 --- a/common/mlstdutils/std_utils_tests.ml +++ b/common/mlstdutils/std_utils_tests.ml @@ -29,6 +29,11 @@ let assert_equal_int = assert_equal ~printer:(fun x -> string_of_int x)
2005 Mar 15
1
Drac and Dovecot, almost there ...
...mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xf6fff000 read(3, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 3306 close(3) = 0 munmap(0xf6fff000, 4096) = 0 access("/usr/libexec/dovecot/pop3-login", X_OK) = 0 open("/etc/passwd", O_RDONLY) = 3 fcntl64(3, F_GETFD) = 0 fcntl64(3, F_SETFD, FD_CLOEXEC) = 0 fstat64(3, {st_mode=S_IFREG|0644, st_size=3306, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xf6fff000 read(3...
2018 Jun 27
0
dovecot-2.3.36 and flush
...T (No such file or directory) close(4)??????????????????????????????? = 0 stat("/etc/dovecot/dovecot.conf", {st_mode=S_IFREG|0640, st_size=3644, ...}) = 0 stat("/etc/dovecot/dovecot.conf", {st_mode=S_IFREG|0640, st_size=3644, ...}) = 0 access("/usr/local/sbin/doveadm", X_OK) = -1 ENOENT (No such file or directory) access("/usr/local/bin/doveadm", X_OK)? = -1 ENOENT (No such file or directory) access("/usr/sbin/doveadm", X_OK)?????? = -1 ENOENT (No such file or directory) access("/usr/bin/doveadm", X_OK)??????? = -1 ENOENT (No such file or...
2017 Mar 22
2
Re: [PATCH 4/5] dib: require a Python interpreter
...+ let p = > + if Filename.is_relative exe then IIUC what you mean here is "the 'exe' filename doesn't contain any slashes"? That isn't what is written above. > + get_required_tool exe > + else ( > + Unix.access exe [Unix.X_OK]; > + exe > + ) in > + Some p > + | None -> None in Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-df lists disk usage of guests without need...
2019 Jan 25
0
[klibc:update-dash] [BUILTIN] Fix "test -x" as root on FreeBSD 8
...ested, access shall be granted if execute permission is granted to at least one user by the file permission bits or by an alternate access control mechanism; otherwise, access shall be denied. For historical reasons, POSIX unfortunately also allows access() and faccessat() to return success for X_OK if the current process is privileged, even when the above condition is not fulfilled and actual execution would fail. On the affected platforms, "test -x <path>" as root started returning true on nonexecutable files when dash switched from its own emulation to the true faccessat in...
2020 Mar 28
0
[klibc:update-dash] dash: [BUILTIN] Fix "test -x" as root on FreeBSD 8
...ested, access shall be granted if execute permission is granted to at least one user by the file permission bits or by an alternate access control mechanism; otherwise, access shall be denied. For historical reasons, POSIX unfortunately also allows access() and faccessat() to return success for X_OK if the current process is privileged, even when the above condition is not fulfilled and actual execution would fail. On the affected platforms, "test -x <path>" as root started returning true on nonexecutable files when dash switched from its own emulation to the true faccessat in...
2003 Nov 27
0
[Fwd: Re: Compiling dovecot on SuSE 9]
...=42162, ...}) = 0 open("/etc/passwd", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=1475, ...}) = 0 open("/etc/passwd", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=1475, ...}) = 0 access("/usr/local/libexec/dovecot/imap-login", X_OK) = 0 access("/usr/local/libexec/dovecot/imap", X_OK) = 0 lstat64("/usr/local/var/run/dovecot", {st_mode=S_IFDIR|0700, st_size=72, ...}) = 0 open("/usr/local/var/run/dovecot", O_RDONLY|O_LARGEFILE) = 3 fstat64(3, {st_mode=S_IFDIR|0700, st_size=72, ...}) = 0 lstat64(&quo...
2017 Jun 22
2
Missing dependencies in pkg installs
...not executable. > > I don't know what is causing this bug. Perhaps a Linux user can > reproduce it and fix it. > > Here's what I see: > > file_test("-x") calls file.access(filename, 1L). That in turn calls the > C library function access(..., X_OK). The ... is the name of the file, > translated into the local encoding and expanded. As far as I can see, > that means ... should be exactly the string below. > > > > [1] "/tmp/RtmpMM6iC1/R.INSTALLc5ca415e4310/stringi" > > The only thing I can think of...
2020 Mar 28
0
[klibc:update-dash] dash: builtin: Use test_access from NetBSD when faccessat is unavailable
...filstat(char *nm, enum token mode) switch (mode) { #ifndef HAVE_FACCESSAT case FILRD: - return test_st_mode(&s, R_OK); + return test_access(&s, R_OK); case FILWR: - return test_st_mode(&s, W_OK); + return test_access(&s, W_OK); case FILEX: - return test_st_mode(&s, X_OK); + return test_access(&s, X_OK); #endif case FILEXIST: return 1; @@ -537,53 +536,165 @@ static int test_file_access(const char *path, int mode) } #else /* HAVE_FACCESSAT */ /* - * Similar to what access(2) does, but uses the effective uid and gid. - * Doesn't make the mistake of...
2016 Aug 02
2
[PATCH] mllib: move which and its exception from dib
...nction | [] -> [] | x :: xs -> x :: (remove_dups (List.filter ((<>) x) xs)) -let which tool = - let paths = String.nsplit ":" (Sys.getenv "PATH") in - let paths = filter_map ( - fun p -> - let path = p // tool in - try Unix.access path [Unix.X_OK]; Some path - with Unix.Unix_error _ -> None - ) paths in - match paths with - | [] -> raise (Tool_not_found tool) - | x :: _ -> x - let require_tool tool = try ignore (which tool) - with Tool_not_found tool -> + with Executable_not_found tool -> error (f_"%s...
2015 Jun 23
0
Re: [PATCH] daemon: Rewrite prog_exists so it uses the actual PATH, not hard-coded list.
...{ "/sbin", "/usr/sbin", "/bin", "/usr/bin" }; > - size_t i; > - char buf[1024]; > - > - for (i = 0; i < sizeof dirs / sizeof dirs[0]; ++i) { > - snprintf (buf, sizeof buf, "%s/%s", dirs[i], prog); > - if (access (buf, X_OK) == 0) > + const char *pathc = getenv ("PATH"); > + > + if (!pathc) > + return 0; > + > + const char *elem; > + char *saveptr; > + size_t len = strlen (pathc) + 1; > + char path[len]; > + strcpy (path, pathc); > + > + elem = strtok_r (path, &...
2019 Jan 11
0
[PATCH 3/3] OCaml: use the new behaviour of Std_utils.which
...7e1b846..24641369e 100644 --- a/common/mltools/tools_utils.ml +++ b/common/mltools/tools_utils.ml @@ -408,9 +408,7 @@ and do_run ?(echo_cmd = true) ?stdout_fd ?stderr_fd args = fd in try - let app = - if Filename.is_relative app then which app - else (Unix.access app [Unix.X_OK]; app) in + let app = which app in let outfd = get_fd Unix.stdout stdout_fd in let errfd = get_fd Unix.stderr stderr_fd in if echo_cmd then diff --git a/dib/cmdline.ml b/dib/cmdline.ml index 220350d9d..11ff57341 100644 --- a/dib/cmdline.ml +++ b/dib/cmdline.ml @@ -251,17 +251,7 @@...
2024 Jan 14
2
ProxyJump may construct erroneous ProxyCommand
Hello, On macOS, Terminal?s ?New Remote Connection?? command runs ssh in a new window like this: login -pfq $USER /usr/bin/ssh $HOST Here, login executes /usr/bin/ssh with argv[0] set to ?-ssh?. If $HOST has a ProxyJump configuration, the resulting ProxyCommand is: -ssh -W '[%h]:%p' $JUMP_HOST Because of the leading hyphen, this fails to execute. If the user?s shell is zsh, the
2009 Nov 18
1
[PATCH] daemon/RHEL: Choose correct udev settle script.
...uestfsd.c @@ -976,5 +976,25 @@ device_name_translation (char *device, const char *func) void udev_settle (void) { - command (NULL, NULL, "/sbin/udevadm", "settle", NULL); + static int which_prog = 0; + + if (which_prog == 0) { + if (access ("/sbin/udevsettle", X_OK) == 0) + which_prog = 2; + else if (access ("/sbin/udevadm", X_OK) == 0) + which_prog = 1; + else + which_prog = 3; + } + + switch (which_prog) { + case 1: + command (NULL, NULL, "/sbin/udevadm", "settle", NULL); + break; + case 2: + c...
2009 Dec 18
1
[PATCH] daemon: Work around udevsettle issue (RHBZ#548121).
...the old symlink + * remained but it stopped working (RHBZ#548121), so we have to be + * careful not to assume that we can use 'udevsettle' if it exists. */ void udev_settle (void) { - static int which_prog = 0; - - if (which_prog == 0) { - if (access ("/sbin/udevsettle", X_OK) == 0) - which_prog = 2; - else if (access ("/sbin/udevadm", X_OK) == 0) - which_prog = 1; - else - which_prog = 3; - } - - switch (which_prog) { - case 1: - command (NULL, NULL, "/sbin/udevadm", "settle", NULL); - break; - case 2: - c...