SMBFS: Disable byte-range locking in Samba's TDB.
svn path=/nixpkgs/trunk/; revision=32732
This commit is contained in:
parent
f20a947a5d
commit
bb08271aa6
@ -2,6 +2,9 @@
|
||||
|
||||
let
|
||||
date = "2011-11-14";
|
||||
samba_patched = stdenv.lib.overrideDerivation samba (attrs: {
|
||||
patches = attrs.patches ++ [ ./samba-without-byte-range-locks.patch ];
|
||||
});
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "smbfs-${date}";
|
||||
@ -19,7 +22,7 @@ stdenv.mkDerivation rec {
|
||||
s|^LDFLAGS=\(.*\)$|LDFLAGS=\1 -pthread|g'
|
||||
'';
|
||||
|
||||
buildInputs = [ hurd machHeaders samba ];
|
||||
buildInputs = [ hurd machHeaders samba_patched ];
|
||||
|
||||
installPhase =
|
||||
'' mkdir -p "$out/hurd"
|
||||
|
@ -0,0 +1,14 @@
|
||||
Since GNU/Hurd doesn't support byte-range file locks, shamelessly
|
||||
disable them to allow the SMB client library to work (it uses TDB
|
||||
to access /etc/samba/private/secrets.tdb, for instance.)
|
||||
|
||||
--- samba/lib/tdb/common/lock.c 2010-02-08 16:12:57.000000000 +0100
|
||||
+++ samba/lib/tdb/common/lock.c 2012-03-01 23:39:02.000000000 +0100
|
||||
@@ -48,7 +48,7 @@ int tdb_brlock(struct tdb_context *tdb,
|
||||
struct flock fl;
|
||||
int ret;
|
||||
|
||||
- if (tdb->flags & TDB_NOLOCK) {
|
||||
+ if (1) {
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user