mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 07:00:43 +00:00
Add nss-myhostname
This commit is contained in:
parent
a570a4c9ed
commit
d72adde530
19
pkgs/tools/networking/nss-myhostname/default.nix
Normal file
19
pkgs/tools/networking/nss-myhostname/default.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{ stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "nss-myhostname-0.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://0pointer.de/lennart/projects/nss-myhostname/${name}.tar.gz";
|
||||
sha256 = "1wnawxklsv3z796l752j7a21gvj2615fk12qr1bir3apipm499rb";
|
||||
};
|
||||
|
||||
patches = [ ./nscd-segfault.patch ./ignore-ipv6-link-local.patch ];
|
||||
|
||||
meta = {
|
||||
description = "Name Service Switch module ensuring that the hostname always resolves to a valid address";
|
||||
homepage = http://0pointer.de/lennart/projects/nss-myhostname/;
|
||||
maintainers = [ stdenv.lib.maintainers.eelco ];
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
};
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
--- nss-myhostname-0.3/netlink.c 2011-05-09 08:56:34.344579140 -0400
|
||||
+++ nss-myhostname-0.3-new/netlink.c 2012-10-06 23:52:10.577755588 -0400
|
||||
@@ -179,6 +179,10 @@
|
||||
ifaddrmsg->ifa_scope == RT_SCOPE_NOWHERE)
|
||||
continue;
|
||||
|
||||
+ if (ifaddrmsg->ifa_family == AF_INET6 &&
|
||||
+ ifaddrmsg->ifa_scope == RT_SCOPE_LINK)
|
||||
+ continue;
|
||||
+
|
||||
if (ifaddrmsg->ifa_flags & IFA_F_DEPRECATED)
|
||||
continue;
|
||||
|
15
pkgs/tools/networking/nss-myhostname/nscd-segfault.patch
Normal file
15
pkgs/tools/networking/nss-myhostname/nscd-segfault.patch
Normal file
|
@ -0,0 +1,15 @@
|
|||
--- nss-myhostname-0.3/nss-myhostname.c 2011-05-09 09:01:27.421581560 -0400
|
||||
+++ nss-myhostname-0.3-new/nss-myhostname.c 2012-10-06 23:40:09.836894004 -0400
|
||||
@@ -177,7 +177,11 @@
|
||||
/* Verify the size matches */
|
||||
assert(idx == ms);
|
||||
|
||||
- *pat = r_tuple_prev;
|
||||
+ /* Nscd expects us to store the first record in **pat. */
|
||||
+ if (*pat)
|
||||
+ **pat = *r_tuple_prev;
|
||||
+ else
|
||||
+ *pat = r_tuple_prev;
|
||||
|
||||
if (ttlp)
|
||||
*ttlp = 0;
|
|
@ -1165,6 +1165,8 @@ let
|
|||
inherit (pythonPackages) pysqlite;
|
||||
};
|
||||
|
||||
nss_myhostname = callPackage ../tools/networking/nss-myhostname {};
|
||||
|
||||
nss_pam_ldapd = callPackage ../tools/networking/nss-pam-ldapd {};
|
||||
|
||||
ntfs3g = callPackage ../tools/filesystems/ntfs-3g { };
|
||||
|
|
Loading…
Reference in a new issue