search for: o_path

Displaying 18 results from an estimated 18 matches for "o_path".

Did you mean: _path
2023 May 30
1
O_PATH, FreeBSD & acl_xx_fd
On Tue, May 30, 2023 at 09:57:37AM +0200, Peter Eriksson via samba wrote: >I?ve been looking at an issue when compiling Samba on FreeBSD 13 with the vfs_zfsacl module. > >It seems the logic that detect O_PATH support in Samba doesn?t work right with FreeBSD 13 (since it has implemented O_PATH support) and especially with the acl_get_fd() function. This is a bug (or rather a missing feature) in FreeBSD that there is a patch for now (dunno when it?ll appear in a release version). > >However, one que...
2023 May 30
2
O_PATH, FreeBSD & acl_xx_fd
I?ve been looking at an issue when compiling Samba on FreeBSD 13 with the vfs_zfsacl module. It seems the logic that detect O_PATH support in Samba doesn?t work right with FreeBSD 13 (since it has implemented O_PATH support) and especially with the acl_get_fd() function. This is a bug (or rather a missing feature) in FreeBSD that there is a patch for now (dunno when it?ll appear in a release version). However, one question t...
2023 May 30
1
O_PATH, FreeBSD & acl_xx_fd
Urgh? I modified the FreeBSD kernel to allow all_xx_fd() calls on O_PATH descriptors and that seems make vfs_zfsacl to work fine. Not 100% tested but I could atleast view and modify the ACL on some stuff from a Windows client via Samba that way. I?m not sure I?ll be able to get them to implement this ?officially? though. Reading ACLs via an O_PATH-opened descriptor se...
2024 Jun 07
1
missing msdfs referrals from samba directory listing: wrong order in smbd_dirptr_get_entry()?
07.06.2024 07:59, Michael Tokarev wrote: > 07.06.2024 07:54, Jeremy Allison wrote: >>> msdfs is broken in 4.19.? It worked fine in 4.18. > > This is not entirely true. Nope. Things are more interesting than that. I've a 4.19 installation where msdfs links works both in listing and when specified directly. There are 2 other installations of 4.19 where msdfs links
2013 Nov 08
1
[PATCH 2/3] syscalls: Add syscalls needed by arm64
...#include <fcntl.h> > +#include <unistd.h> > +#include <sys/types.h> > +#include <sys/stat.h> > +#include <sys/syscall.h> > + > +#ifndef __NR_lstat > + > +int lstat(const char *path, struct stat *buf) > +{ > + int fd = open(path, O_RDONLY | O_PATH | O_NOFOLLOW); > + int ret = fstat(fd, buf); > + close(fd); > + return ret; > +} > + > +#endif /* __NR_lstat */ [...] > diff --git a/usr/klibc/stat.c b/usr/klibc/stat.c > new file mode 100644 > index 0000000..92343f1 > --- /dev/null > +++ b/usr/klibc/stat.c &g...
2023 Apr 04
1
Virtiofsd
...ns>... Options in a format compatible with the legacy implementation [deprecated] --fd <fd> File descriptor for the listening socket --inode-file-handles=<inode-file-handles> When to use file handles to reference inodes instead of O_PATH file descriptors (never, prefer, mandatory) - never: Never use file handles, always use O_PATH file descriptors. - prefer: Attempt to generate file handles, but fall back to O_PATH file descriptors where the underlying filesystem does not support file handles....
2014 Sep 27
2
[PATCH 1/2] Implement realpath()
This is needed as the basis for the readlink -f option. Signed-off-by: Ben Hutchings <ben at decadent.org.uk> --- --- a/usr/include/stdlib.h +++ b/usr/include/stdlib.h @@ -92,4 +92,6 @@ static __inline__ int grantpt(int __fd) return 0; /* devpts does this all for us! */ } +__extern char *realpath(const char *, char *); + #endif /* _STDLIB_H */ --- a/usr/klibc/Kbuild +++
2016 Jan 06
0
[klibc:master] MIPS: Update archfcntl.h
...hings <ben at decadent.org.uk> AuthorDate: Wed, 6 Jan 2016 00:43:25 +0000 Committer: H. Peter Anvin <hpa at linux.intel.com> CommitDate: Tue, 5 Jan 2016 17:45:36 -0800 [klibc] MIPS: Update archfcntl.h Update usr/include/arch/mips/archfcntl.h from kernel headers: - Add definitions of O_PATH, O_TMPFILE - Update value of O_SYNC to include __O_SYNC - Add definitions of F_{SET,GET}OWN_EX, F_GETOWNER_UIDS, F_OFD_{GETLK,SETLK,SETLKW}, F_OWNER_{TID,PID,PGRP} Signed-off-by: Ben Hutchings <ben at decadent.org.uk> Signed-off-by: H. Peter Anvin <hpa at linux.intel.com> --- usr/i...
2014 Sep 29
0
[PATCH v2 1/2] Implement realpath()
This is needed as the basis for the readlink -f option. Signed-off-by: Ben Hutchings <ben at decadent.org.uk> --- v2: Don't implement the BSD/GNU extension of allowing a non-existent last part. Use open(O_PATH) and procfs to get resolved name from the kernel. --- a/usr/include/stdlib.h +++ b/usr/include/stdlib.h @@ -92,4 +92,6 @@ static __inline__ int grantpt(int __fd) return 0; /* devpts does this all for us! */ } +__extern char *realpath(const char *, char *); + #endif /* _STDLIB_H */ --- a/...
2021 Oct 05
0
[Announce] Samba 4.14.8 Available for Download
...ttributes test. ?? * BUG 14841: Samba CI runs can now continue past the first error if ???? AUTOBUILD_FAIL_IMMEDIATELY=0 is set. ?? * BUG 14854: samldb_krbtgtnumber_available() looks for incorrect string. o? Ralph Boehme <slow at samba.org> ?? * BUG 14771: Some VFS operations on pathref (O_PATH) handles fail on GPFS. ?? * BUG 14783: smbd "deadtime" parameter doesn't work anymore. ?? * BUG 14787: net conf list crashes when run as normal user. ?? * BUG 14790: vfs_btrfs compression support broken. ?? * BUG 14804: winbindd can crash because idmap child state is not fully ?...
2021 Oct 05
0
[Announce] Samba 4.14.8 Available for Download
...ttributes test. ?? * BUG 14841: Samba CI runs can now continue past the first error if ???? AUTOBUILD_FAIL_IMMEDIATELY=0 is set. ?? * BUG 14854: samldb_krbtgtnumber_available() looks for incorrect string. o? Ralph Boehme <slow at samba.org> ?? * BUG 14771: Some VFS operations on pathref (O_PATH) handles fail on GPFS. ?? * BUG 14783: smbd "deadtime" parameter doesn't work anymore. ?? * BUG 14787: net conf list crashes when run as normal user. ?? * BUG 14790: vfs_btrfs compression support broken. ?? * BUG 14804: winbindd can crash because idmap child state is not fully ?...
2015 Aug 01
2
unnecessary /proc requirement in 3.1.1
...urity risk for me. Why? starce log lstat64("tt", {st_mode=S_IFDIR|S_ISGID|0755, st_size=4096, ...}) = 0 fstatat64(AT_FDCWD, "tt", {st_mode=S_IFDIR|S_ISGID|0755, st_size=4096, ...}, AT _SYMLINK_NOFOLLOW) = 0 openat(AT_FDCWD, "tt", O_RDONLY|O_NOCTTY|O_NOFOLLOW|O_CLOEXEC|O_PATH) = 2 fstatat64(AT_FDCWD, "/proc/self/fd/2", 0x5bafe7f0, 0) = -1 ENOENT (No such file or directory) close(2) = 0 getpid() = 1395 sendto(0, "<28>Aug 1 00:35:51 rsyncd[1395]"..., 117, 0, NULL, 0) = -1 ENOTCONN (...
2016 Jan 06
0
[klibc:master] Implement realpath()
...ory. + */ + +char *realpath(const char *name, char *resolved_name) +{ + static const char proc_fd_prefix[] = "/proc/self/fd/"; + char proc_fd_name[sizeof(proc_fd_prefix) + sizeof(int) * 3]; + int allocated = 0; + int fd; + ssize_t len; + + /* Open for path lookup only */ + fd = open(name, O_PATH); + if (fd < 0) + return NULL; + + if (!resolved_name) { + resolved_name = malloc(PATH_MAX); + if (!resolved_name) + goto out_close; + allocated = 1; + } + + /* Use procfs to read back the resolved name */ + sprintf(proc_fd_name, "%s%d", proc_fd_prefix, fd); + len = readlink(proc...
2016 Jan 06
5
[PATCH klibc 0/5] klibc architecture fixes
Here's an assortment of build and run-time fixes for various architectures that we've applied in Debian. Ben. Aurelien Jarno (1): ppc64: fix struct stat Ben Hutchings (2): MIPS: Update archfcntl.h syscalls: Override detection of direct socket syscalls on i386, m68k, s390 Helge Deller (1): Add pread and pwrite 32bit syscall wrappers for parisc Mauricio Faria de Oliveira
2016 Jan 06
3
[PATCH klibc 0/3] Changes to support initramfs-tools 0.117
initramfs-tools version 0.117 requires 'readlink -f' and 'mount -o defaults' to work. The first two patches were previously submitted but not applied. Ben. Ben Hutchings (3): Implement realpath() readlink: Add -f option mount: Implement -o defaults usr/include/stdlib.h | 2 ++ usr/klibc/Kbuild | 2 +- usr/klibc/realpath.c | 49
2013 Nov 08
9
[PATCH 0/3] Introduce arm64 support
Hello, This series introduces arm64 support to klibc. I've rebased the work from Neil Williams and Anil Singhar into the following three patches. Most of the code changes are due to new syscall implementations being needed for arm64 as a only a minimal set of syscalls are defined in the arm64 kernel. This series is to be applied against the latest klibc, just after 25a66fa README.klibc:
2023 Mar 19
3
[libnbd PATCH v4 0/2] lib/utils: introduce async-signal-safe execvpe()
...ith incremental review, here's a range-diff: > 1: c5f89eaa0aaf ! 1: 2a3c95d0701f lib/utils: introduce async-signal-safe execvpe() > @@ Commit message > not to pass it, per APPLICATION USAGE [09], but on Linux/glibc, O_EXEC > does not seem supported, only O_PATH does [10]. > > - Thus the chosen approach -- pre-generate filenames -- contains a small > + Thus the chosen approach -- pre-generate filenames -- contains a small > TOCTTOU race (highlighted by Eric) after all, but it should be harmless. > > Implem...
2013 Nov 08
0
[PATCH 2/3] syscalls: Add syscalls needed by arm64
...ev/null +++ b/usr/klibc/lstat.c @@ -0,0 +1,17 @@ +#include <fcntl.h> +#include <unistd.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <sys/syscall.h> + +#ifndef __NR_lstat + +int lstat(const char *path, struct stat *buf) +{ + int fd = open(path, O_RDONLY | O_PATH | O_NOFOLLOW); + int ret = fstat(fd, buf); + close(fd); + return ret; +} + +#endif /* __NR_lstat */ diff --git a/usr/klibc/mkdir.c b/usr/klibc/mkdir.c new file mode 100644 index 0000000..27673e3 --- /dev/null +++ b/usr/klibc/mkdir.c @@ -0,0 +1,14 @@ +#include <fcntl.h> +#include <sys/sta...