[freeradius/f21] Add -D option support to dhcpclient

Nikolai Kondrashov nkondras at fedoraproject.org
Mon Jan 19 19:32:34 UTC 2015


commit a2e8fb9f7068fd0717f93e1b6d9ab1cf65f808fd
Author: Nikolai Kondrashov <Nikolai.Kondrashov at redhat.com>
Date:   Fri Dec 5 16:18:49 2014 +0200

    Add -D option support to dhcpclient
    
    Add support for -D option to radclient. The option allows overriding the
    main dictionary directory location. This fixes the inability to fully
    override dictionary locations introduced with
    "freeradius-fix-dhcp-dictionary-loading.patch".
    
    Related: Bug#1146939

 ...radius-added-D-option-to-mirror-radclient.patch |   37 ++++++++++++++++++++
 freeradius.spec                                    |    2 +
 2 files changed, 39 insertions(+), 0 deletions(-)
---
diff --git a/freeradius-added-D-option-to-mirror-radclient.patch b/freeradius-added-D-option-to-mirror-radclient.patch
new file mode 100644
index 0000000..1e14f15
--- /dev/null
+++ b/freeradius-added-D-option-to-mirror-radclient.patch
@@ -0,0 +1,37 @@
+From 08700ea8b1f3a1ace01d294548f3ba2391cc06ab Mon Sep 17 00:00:00 2001
+From: "Alan T. DeKok" <aland at freeradius.org>
+Date: Sun, 2 Nov 2014 14:44:32 -0500
+Subject: [PATCH 1/1] Added -D option to mirror radclient
+
+---
+ src/modules/proto_dhcp/dhcpclient.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/src/modules/proto_dhcp/dhcpclient.c b/src/modules/proto_dhcp/dhcpclient.c
+index ac52ffd..3bce4b3 100644
+--- a/src/modules/proto_dhcp/dhcpclient.c
++++ b/src/modules/proto_dhcp/dhcpclient.c
+@@ -73,6 +73,7 @@ static void NEVER_RETURNS usage(void)
+ 
+ 	fprintf(stderr, "  <command>              One of discover, request, offer, decline, release, inform.\n");
+ 	fprintf(stderr, "  -d <directory>         Set the directory where the dictionaries are stored (defaults to " RADDBDIR ").\n");
++	fprintf(stderr, "  -D <dictdir>           Set main dictionary directory (defaults to " DICTDIR ").\n");
+ 	fprintf(stderr, "  -f <file>              Read packets from file, not stdin.\n");
+ 	fprintf(stderr, "  -t <timeout>           Wait 'timeout' seconds for a reply (may be a floating point number).\n");
+ 	fprintf(stderr, "  -v                     Show program version information.\n");
+@@ -270,7 +271,11 @@ int main(int argc, char **argv)
+ 
+ 	fr_debug_flag = 0;
+ 
+-	while ((c = getopt(argc, argv, "d:f:hr:t:vx")) != EOF) switch(c) {
++	while ((c = getopt(argc, argv, "d:D:f:hr:t:vx")) != EOF) switch(c) {
++		case 'D':
++			dict_dir = optarg;
++			break;
++
+ 		case 'd':
+ 			radius_dir = optarg;
+ 			break;
+-- 
+2.1.3
+
diff --git a/freeradius.spec b/freeradius.spec
index 07dcec5..e8ee8ed 100644
--- a/freeradius.spec
+++ b/freeradius.spec
@@ -41,6 +41,7 @@ Patch17: freeradius-ignore-SIGTERM-when-firing-stop-and-signal.term.patch
 Patch18: freeradius-raddb-update-triggers-in-trigger.conf.patch
 Patch19: freeradius-make-grp-tallo-c-too.patch
 Patch20: freeradius-fix-checks-for-PW_TYPE_FILE_INPUT.patch
+Patch21: freeradius-added-D-option-to-mirror-radclient.patch
 
 %global docdir %{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}}
 
@@ -217,6 +218,7 @@ This plugin provides the unixODBC support for the FreeRADIUS server project.
 %patch18 -p1
 %patch19 -p1
 %patch20 -p1
+%patch21 -p1
 
 %build
 # Force compile/link options, extra security for network facing daemon


More information about the scm-commits mailing list