aboutsummaryrefslogtreecommitdiff
path: root/src/gns/nss
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-09-17 12:07:58 +0000
committerChristian Grothoff <christian@grothoff.org>2012-09-17 12:07:58 +0000
commit7e3313ce2b4797bde341340f4402ddc14cb63138 (patch)
treead5b6270bab4049e6de09de0595981473d13fd9f /src/gns/nss
parent7376708ac7b99e80fb28e47b4acb305ef8069d3c (diff)
downloadgnunet-7e3313ce2b4797bde341340f4402ddc14cb63138.tar.gz
gnunet-7e3313ce2b4797bde341340f4402ddc14cb63138.zip
-adding GPLv3 license, adding uninstall script to fix #2534
Diffstat (limited to 'src/gns/nss')
-rw-r--r--src/gns/nss/Makefile.am16
-rwxr-xr-xsrc/gns/nss/install-nss-plugin.sh5
-rw-r--r--src/gns/nss/nss_gns.c4
-rw-r--r--src/gns/nss/nss_gns_query.c19
-rw-r--r--src/gns/nss/nss_gns_query.h43
-rwxr-xr-xsrc/gns/nss/uninstall-nss-plugin.sh8
6 files changed, 56 insertions, 39 deletions
diff --git a/src/gns/nss/Makefile.am b/src/gns/nss/Makefile.am
index f658832b8..0569fce7d 100644
--- a/src/gns/nss/Makefile.am
+++ b/src/gns/nss/Makefile.am
@@ -3,8 +3,8 @@
3# This file taken and modified from nss-gns. 3# This file taken and modified from nss-gns.
4# 4#
5# nss-gns is free software; you can redistribute it and/or modify it 5# nss-gns is free software; you can redistribute it and/or modify it
6# under the terms of the GNU Lesser General Public License as 6# under the terms of the GNU General Public License as
7# published by the Free Software Foundation; either version 2 of the 7# published by the Free Software Foundation; either version 3 of the
8# License, or (at your option) any later version. 8# License, or (at your option) any later version.
9# 9#
10# nss-gns is distributed in the hope that it will be useful, but 10# nss-gns is distributed in the hope that it will be useful, but
@@ -52,17 +52,11 @@ libnss_gns6_la_CFLAGS=$(libnss_gns_la_CFLAGS) -DNSS_IPV6_ONLY=1
52libnss_gns6_la_LDFLAGS=$(libnss_gns_la_LDFLAGS) 52libnss_gns6_la_LDFLAGS=$(libnss_gns_la_LDFLAGS)
53 53
54if !MINGW 54if !MINGW
55if HAVE_SUDO
56install-data-hook: 55install-data-hook:
57 $(top_srcdir)/src/gns/nss/install-nss-plugin.sh $(SHELL) $(top_builddir) $(nssdir) $(SUDO_BINARY) 56 $(top_srcdir)/src/gns/nss/install-nss-plugin.sh $(SHELL) $(top_builddir) $(nssdir) $(SUDO_BINARY)
58 57
59uninstall-hook: 58uninstall-hook:
60 $(top_srcdir)/src/gns/nss/uninstall-nss-plugin.sh $(SUDO_BINARY) $(nssdir) 59 $(top_srcdir)/src/gns/nss/uninstall-nss-plugin.sh $(SHELL) $(top_builddir) "rm -f $(nssdir)/libnss_gns.so.2" $(SUDO_BINARY)
61 60 $(top_srcdir)/src/gns/nss/uninstall-nss-plugin.sh $(SHELL) $(top_builddir) "rm -f $(nssdir)/libnss_gns4.so.2" $(SUDO_BINARY)
62endif 61 $(top_srcdir)/src/gns/nss/uninstall-nss-plugin.sh $(SHELL) $(top_builddir) "rm -f $(nssdir)/libnss_gns6.so.2" $(SUDO_BINARY)
63else
64install-data-hook:
65
66uninstall-hook:
67
68endif 62endif
diff --git a/src/gns/nss/install-nss-plugin.sh b/src/gns/nss/install-nss-plugin.sh
index 293786bc5..c87db763c 100755
--- a/src/gns/nss/install-nss-plugin.sh
+++ b/src/gns/nss/install-nss-plugin.sh
@@ -3,7 +3,6 @@
3# $2 - top_builddir 3# $2 - top_builddir
4# $3 - nssdir 4# $3 - nssdir
5# $4 - sudo binary (empty if root) 5# $4 - sudo binary (empty if root)
6$4 $1 $2/libtool --finish $3 6$4 $1 $2/libtool --mode=finish $3
7echo LTINST: $4 $1 $2/libtool --mode=finish $3
7$4 rm -f $3/libnss_gns.la $3/libnss_gns4.la $3/libnss_gns6.la 8$4 rm -f $3/libnss_gns.la $3/libnss_gns4.la $3/libnss_gns6.la
8
9
diff --git a/src/gns/nss/nss_gns.c b/src/gns/nss/nss_gns.c
index e48e4206c..ce9dcf34d 100644
--- a/src/gns/nss/nss_gns.c
+++ b/src/gns/nss/nss_gns.c
@@ -4,8 +4,8 @@
4 Parts taken from: nss.c in nss-mdns 4 Parts taken from: nss.c in nss-mdns
5 5
6 nss-mdns is free software; you can redistribute it and/or modify 6 nss-mdns is free software; you can redistribute it and/or modify
7 it under the terms of the GNU Lesser General Public License as published 7 it under the terms of the GNU General Public License as published
8 by the Free Software Foundation; either version 2 of the License, 8 by the Free Software Foundation; either version 3 of the License,
9 or (at your option) any later version. 9 or (at your option) any later version.
10 10
11 nss-mdns is distributed in the hope that it will be useful, but1 11 nss-mdns is distributed in the hope that it will be useful, but1
diff --git a/src/gns/nss/nss_gns_query.c b/src/gns/nss/nss_gns_query.c
index 11356c216..b8f6c164d 100644
--- a/src/gns/nss/nss_gns_query.c
+++ b/src/gns/nss/nss_gns_query.c
@@ -1,3 +1,22 @@
1/*
2 This file is part of GNUnet.
3 (C) 2012 Christian Grothoff (and other contributing authors)
4
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
9
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
19*/
1#include <string.h> 20#include <string.h>
2#include <stdio.h> 21#include <stdio.h>
3#include <stdlib.h> 22#include <stdlib.h>
diff --git a/src/gns/nss/nss_gns_query.h b/src/gns/nss/nss_gns_query.h
index 0b4dae5e7..65b0311fe 100644
--- a/src/gns/nss/nss_gns_query.h
+++ b/src/gns/nss/nss_gns_query.h
@@ -1,31 +1,28 @@
1/*
2 This file is part of GNUnet.
3 (C) 2012 Christian Grothoff (and other contributing authors)
4
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
9
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
19*/
1#ifndef NSS_GNS_QUERY_H 20#ifndef NSS_GNS_QUERY_H
2#define NSS_GNS_QUERY_H 21#define NSS_GNS_QUERY_H
3 22
4/** 23/**
5 * Parts taken from nss-mdns. Original license statement follows 24 * Parts taken from nss-mdns
6 */ 25 */
7
8/* $Id$ */
9
10/***
11 This file is part of nss-mdns.
12
13 nss-mdns is free software; you can redistribute it and/or modify it
14 under the terms of the GNU Lesser General Public License as
15 published by the Free Software Foundation; either version 2 of the
16 License, or (at your option) any later version.
17
18 nss-mdns is distributed in the hope that it will be useful, but
19 WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 General Public License for more details.
22
23 You should have received a copy of the GNU Lesser General Public
24 License along with nss-mdns; if not, write to the Free Software
25 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
26 USA.
27***/
28
29#include <inttypes.h> 26#include <inttypes.h>
30 27
31/* Maximum number of entries to return */ 28/* Maximum number of entries to return */
diff --git a/src/gns/nss/uninstall-nss-plugin.sh b/src/gns/nss/uninstall-nss-plugin.sh
new file mode 100755
index 000000000..61c8eff86
--- /dev/null
+++ b/src/gns/nss/uninstall-nss-plugin.sh
@@ -0,0 +1,8 @@
1#!/bin/bash
2# $1 - shell
3# $2 - top_builddir
4# $3 - nssdir+path of library to remove
5# $4 - sudo binary (empty if root)
6$4 $1 $2/libtool --mode=uninstall $3
7
8