Merge tag 'release_3_0_12' into branch moonshot-fr-3.0.12-upgrade.
[freeradius.git] / debian / patches / radiusd-to-freeradius.diff
1 --- a/Make.inc.in
2 +++ b/Make.inc.in
3 @@ -95,7 +95,7 @@
4  
5  LOGDIR         = ${logdir}
6  RADDBDIR       = ${raddbdir}
7 -RUNDIR         = ${localstatedir}/run/radiusd
8 +RUNDIR         = ${localstatedir}/run/freeradius
9  SBINDIR                = ${sbindir}
10  RADIR          = ${radacctdir}
11  LIBRADIUS      = $(top_builddir)/src/lib/$(LIBPREFIX)freeradius-radius.la $(TALLOC_LIBS)
12 --- a/raddb/radiusd.conf.in
13 +++ b/raddb/radiusd.conf.in
14 @@ -61,7 +61,7 @@
15  
16  #
17  #  name of the running server.  See also the "-n" command-line option.
18 -name = radiusd
19 +name = freeradius
20  
21  #  Location of config and logfiles.
22  confdir = ${raddbdir}
23 @@ -436,8 +436,8 @@
24         #  member.  This can allow for some finer-grained access
25         #  controls.
26         #
27 -#      user = radius
28 -#      group = radius
29 +       user = freerad
30 +       group = freerad
31  
32         #  Core dumps are a bad thing.  This should only be set to
33         #  'yes' if you're debugging a problem with the server.
34 --- a/scripts/monit/freeradius.monitrc
35 +++ b/scripts/monit/freeradius.monitrc
36 @@ -8,9 +8,9 @@
37  #  Totalmem limit should be lowered to 200.0 if none of the 
38  #  interpreted language modules or rlm_cache are being used.
39  #
40 -check process radiusd with pidfile /var/run/radiusd/radiusd.pid
41 -   start program = "/etc/init.d/radiusd start"
42 -   stop program = "/etc/init.d/radiusd stop"
43 +check process freeradius with pidfile /var/run/freeradius/freeradius.pid
44 +   start program = "/etc/init.d/freeradius start"
45 +   stop program = "/etc/init.d/freeradius stop"
46     if failed host 127.0.0.1 port 1812 type udp protocol radius secret testing123 then alert
47     if failed host 127.0.0.1 port 1813 type udp protocol radius secret testing123 then alert
48     if cpu > 95% for 2 cycles then alert
49 --- a/raddb/sites-available/control-socket
50 +++ b/raddb/sites-available/control-socket
51 @@ -72,12 +72,12 @@
52         #
53         #  Name of user that is allowed to connect to the control socket.
54         #
55 -#      uid = radius
56 +#      uid = freerad
57  
58         #
59         #  Name of group that is allowed to connect to the control socket.
60         #
61 -#      gid = radius
62 +#      gid = freerad
63  
64         #
65         #  Access mode.
66 diff --git a/src/main/radiusd.c b/src/main/radiusd.c
67 index 1ae66ec..ee1a711 100644
68 --- a/src/main/radiusd.c
69 +++ b/src/main/radiusd.c
70 @@ -93,7 +93,6 @@ int main(int argc, char *argv[])
71         bool display_version = false;
72         int flag = 0;
73         int from_child[2] = {-1, -1};
74 -       char *p;
75         fr_state_t *state = NULL;
76
77         /*
78 @@ -128,13 +127,7 @@ int main(int argc, char *argv[])
79         main_config.myip.af = AF_UNSPEC;
80         main_config.port = 0;
81         main_config.daemonize = true;
82 -
83 -       p = strrchr(argv[0], FR_DIR_SEP);
84 -       if (!p) {
85 -               main_config.name = argv[0];
86 -       } else {
87 -               main_config.name = p + 1;
88 -       }
89 +       main_config.name = "radiusd";
90
91         /*
92          *      Don't put output anywhere until we get told a little