diff options
author | Timur I. Bakeyev <timur@FreeBSD.org> | 2009-03-07 05:57:21 +0000 |
---|---|---|
committer | Timur I. Bakeyev <timur@FreeBSD.org> | 2009-03-07 05:57:21 +0000 |
commit | 431ad105714c66ef58a4b33f5a03de1b1a2a505c (patch) | |
tree | e766a4090c997433018a3524efc069ba995215a2 /net/samba33/files/patch-smbd__statvfs.c | |
parent | Update to 4.1.0.4 (diff) |
PR:
Submitted by: timur
Reviewed by:
Approved by:
Obtained from:
MFC after:
Security:
Brand new version of Samba 3.3.1, the starter of the 3.3 series. New
features, new bugs. Enjoy!
Major enhancements in Samba 3.3 include:
General changes:
o The passdb tdbsam version has been raised.
Configuration/installation:
o Splitting of library directory into library directory and separate
modules directory.
o The default value of "ldap ssl" has been changed to "start tls".
File Serving:
o Extended Cluster support.
o New experimental VFS modules "vfs_acl_xattr" and "vfs_acl_tdb"
to store NTFS ACLs on Samba file servers.
Winbind:
o Simplified idmap configuration.
o New idmap backends "adex" and "hash".
o Added new parameter "winbind reconnect delay".
o Added support for user and group aliasing.
o Added support for multiple domains to idmap_ad.
Administrative tools:
o The destination "all" of smbcontrol does now affect all running
daemons including nmbd and winbindd.
o New 'net rpc vampire keytab' and 'net rpc vampire ldif' commands.
o The 'net' utility can now use kerberos for joining and authentication.
o The 'wbinfo' utility can now add, modify and remove identity mapping entries.
Notes
Notes:
svn path=/head/; revision=229621
Diffstat (limited to 'net/samba33/files/patch-smbd__statvfs.c')
-rw-r--r-- | net/samba33/files/patch-smbd__statvfs.c | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/net/samba33/files/patch-smbd__statvfs.c b/net/samba33/files/patch-smbd__statvfs.c new file mode 100644 index 000000000000..d15c4bcfa2d9 --- /dev/null +++ b/net/samba33/files/patch-smbd__statvfs.c @@ -0,0 +1,64 @@ +--- ./smbd/statvfs.c.orig 2008-12-19 13:57:33.000000000 +0000 ++++ ./smbd/statvfs.c 2009-01-06 17:10:53.000000000 +0000 +@@ -3,6 +3,7 @@ + VFS API's statvfs abstraction + Copyright (C) Alexander Bokovoy 2005 + Copyright (C) Steve French 2005 ++ Copyright (C) Timur I. Bakeyev 2005 + Copyright (C) James Peach 2006 + + This program is free software; you can redistribute it and/or modify +@@ -47,9 +48,42 @@ + } + return result; + } +-#endif ++#elif defined(FREEBSD) ++static int bsd_statvfs(const char *path, vfs_statvfs_struct *statbuf) ++{ ++ struct statfs statfs_buf; ++ int result; + +-#if defined(DARWINOS) ++ result = statfs(path, &statfs_buf); ++ if(result != 0) { ++ return result; ++ } ++ ++ statbuf->OptimalTransferSize = statfs_buf.f_iosize; ++ statbuf->BlockSize = statfs_buf.f_bsize; ++ statbuf->TotalBlocks = statfs_buf.f_blocks; ++ statbuf->BlocksAvail = statfs_buf.f_bfree; ++ statbuf->UserBlocksAvail = statfs_buf.f_bavail; ++ statbuf->TotalFileNodes = statfs_buf.f_files; ++ statbuf->FreeFileNodes = statfs_buf.f_ffree; ++ statbuf->FsIdentifier = ++ (((SMB_BIG_UINT)statfs_buf.f_fsid.val[0]<<32) & 0xffffffff00000000LL) | (SMB_BIG_UINT)statfs_buf.f_fsid.val[1]; ++ /* Try to extrapolate some of the fs flags into the ++ * capabilities ++ */ ++ statbuf->FsCapabilities = ++ FILE_CASE_SENSITIVE_SEARCH | FILE_CASE_PRESERVED_NAMES; ++ if(statfs_buf.f_flags & MNT_ACLS) ++ statbuf->FsCapabilities |= FILE_PERSISTENT_ACLS; ++ if(statfs_buf.f_flags & MNT_QUOTA) ++ statbuf->FsCapabilities |= FILE_VOLUME_QUOTAS; ++ if(statfs_buf.f_flags & MNT_RDONLY) ++ statbuf->FsCapabilities |= FILE_READ_ONLY_VOLUME; ++ ++ return 0; ++} ++ ++#elif defined(DARWINOS) + + #include <sys/attr.h> + +@@ -135,6 +169,8 @@ + { + #if defined(LINUX) && defined(HAVE_FSID_INT) + return linux_statvfs(path, statbuf); ++#elif defined(FREEBSD) ++ return bsd_statvfs(path, statbuf); + #elif defined(DARWINOS) + return darwin_statvfs(path, statbuf); + #else |