openbsd-ports/net/samba/patches/patch-source3_modules_vfs_default_c
sthen de35723980 add patches to samba, from Brad, ok with maintainer, also tested by nigel@
- backport *BSD sys_statvfs() wrapper
- tweak autoconf check for cups
2012-04-16 21:58:34 +00:00

26 lines
848 B
Plaintext

$OpenBSD: patch-source3_modules_vfs_default_c,v 1.1 2012/04/16 21:58:34 sthen Exp $
--- source3/modules/vfs_default.c.orig Sat Apr 7 14:23:20 2012
+++ source3/modules/vfs_default.c Tue Apr 10 23:49:09 2012
@@ -104,15 +104,15 @@ static uint32_t vfswrap_fs_capabilities(struct vfs_han
connection_struct *conn = handle->conn;
uint32_t caps = FILE_CASE_SENSITIVE_SEARCH | FILE_CASE_PRESERVED_NAMES;
struct smb_filename *smb_fname_cpath = NULL;
+ struct vfs_statvfs_struct statbuf;
NTSTATUS status;
- int ret = -1;
+ int ret;
-#if defined(DARWINOS)
- struct vfs_statvfs_struct statbuf;
ZERO_STRUCT(statbuf);
- sys_statvfs(conn->connectpath, &statbuf);
- caps = statbuf.FsCapabilities;
-#endif
+ ret = sys_statvfs(conn->connectpath, &statbuf);
+ if (ret == 0) {
+ caps = statbuf.FsCapabilities;
+ }
*p_ts_res = TIMESTAMP_SET_SECONDS;