ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/src/conf.C
(Generate patch)

Comparing gvpe/src/conf.C (file contents):
Revision 1.58 by root, Tue Jan 17 21:38:10 2012 UTC vs.
Revision 1.59 by root, Tue Dec 4 10:29:43 2012 UTC

38#include <errno.h> 38#include <errno.h>
39#include <netdb.h> 39#include <netdb.h>
40#include <sys/stat.h> 40#include <sys/stat.h>
41#include <sys/types.h> 41#include <sys/types.h>
42#include <unistd.h> 42#include <unistd.h>
43#include <pwd.h>
43 44
44#include "netcompat.h" 45#include "netcompat.h"
45 46
46#include <openssl/err.h> 47#include <openssl/err.h>
47#include <openssl/pem.h> 48#include <openssl/pem.h>
180 free (proxy_auth); proxy_auth = 0; 181 free (proxy_auth); proxy_auth = 0;
181#endif 182#endif
182#if ENABLE_DNS 183#if ENABLE_DNS
183 free (dns_forw_host); dns_forw_host = 0; 184 free (dns_forw_host); dns_forw_host = 0;
184#endif 185#endif
186 free (change_root); change_root = 0;
185 free (script_if_up); script_if_up = 0; 187 free (script_if_up); script_if_up = 0;
186 free (script_node_up); script_node_up = 0; 188 free (script_node_up); script_node_up = 0;
187 free (script_node_change); script_node_change = 0; 189 free (script_node_change); script_node_change = 0;
188 free (script_node_down); script_node_down = 0; 190 free (script_node_down); script_node_down = 0;
189} 191}
273 { 275 {
274#if ENABLE_ICMP 276#if ENABLE_ICMP
275 conf.icmp_type = atoi (val); 277 conf.icmp_type = atoi (val);
276#endif 278#endif
277 } 279 }
280 else if (!strcmp (var, "chuser"))
281 {
282 struct passwd *pw = getpwnam (val);
283 if (!pw)
284 return _("user specified for chuser not found");
278 285
279 // per config 286 conf.change_uid = pw->pw_uid;
287 conf.change_gid = pw->pw_gid;
288 }
289 else if (!strcmp (var, "chuid"))
290 conf.change_uid = atoi (val);
291 else if (!strcmp (var, "chgid"))
292 conf.change_gid = atoi (val);
293 else if (!strcmp (var, "chroot"))
294 free (conf.change_root), conf.change_root = strdup (val);
295
296 // per node
280 else if (!strcmp (var, "node")) 297 else if (!strcmp (var, "node"))
281 { 298 {
282 parse_argv (); 299 parse_argv ();
283 300
284 conf.default_node.id++; 301 conf.default_node.id++;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines