Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 164242 Details for
Bug 205214
net-misc/dhcp-4.0 version bump
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
dhcp-4.0-dhclient-stdin-conf.patch
dhcp-4.0-dhclient-stdin-conf.patch (text/plain), 2.34 KB, created by
Tony Vroon (RETIRED)
on 2008-09-01 13:53:26 UTC
(
hide
)
Description:
dhcp-4.0-dhclient-stdin-conf.patch
Filename:
MIME Type:
Creator:
Tony Vroon (RETIRED)
Created:
2008-09-01 13:53:26 UTC
Size:
2.34 KB
patch
obsolete
>diff -uNr dhcp-4.0.0.ORIG/client/clparse.c dhcp-4.0.0/client/clparse.c >--- dhcp-4.0.0.ORIG/client/clparse.c 2008-09-01 13:50:55.000000000 +0100 >+++ dhcp-4.0.0/client/clparse.c 2008-09-01 13:51:31.000000000 +0100 >@@ -149,6 +149,11 @@ > status = read_client_conf_file (path_dhclient_conf, > (struct interface_info *)0, > &top_level_config); >+ >+ /* Read any extra configuration from stdin */ >+ read_client_conf_stdin ((struct interface_info *)0, >+ &top_level_config); >+ > if (status != ISC_R_SUCCESS) { > ; > #ifdef LATER >@@ -201,20 +206,17 @@ > return status; > } > >-int read_client_conf_file (const char *name, struct interface_info *ip, >- struct client_config *client) >+int read_client_conf_actual (int file, const char *name, >+ struct interface_info *ip, >+ struct client_config *client) > { >- int file; > struct parse *cfile; > const char *val; > int token; > isc_result_t status; > >- if ((file = open (name, O_RDONLY)) < 0) >- return uerr2isc (errno); >- > cfile = (struct parse *)0; >- new_parse (&cfile, file, (char *)0, 0, path_dhclient_conf, 0); >+ new_parse (&cfile, file, (char *)0, 0, name , 0); > > do { > token = peek_token (&val, (unsigned *)0, cfile); >@@ -230,6 +232,32 @@ > return status; > } > >+int read_client_conf_file (const char *name, struct interface_info *ip, >+ struct client_config *client) >+{ >+ int file; >+ isc_result_t status; >+ >+ if ((file = open (name, O_RDONLY)) < 0) >+ return uerr2isc (errno); >+ >+ status = read_client_conf_actual(file, name, ip, client); >+ >+ return status; >+} >+ >+ >+int read_client_conf_stdin (struct interface_info *ip, >+ struct client_config *client) >+{ >+ int file = fileno(stdin); >+ isc_result_t status; >+ >+ if (isatty(file)) return ISC_R_NOTFOUND; >+ status = read_client_conf_actual(file, "stdin", ip, client); >+ >+ return status; >+} > > /* lease-file :== client-lease-statements END_OF_FILE > client-lease-statements :== <nil> >diff -uNr dhcp-4.0.0.ORIG/common/conflex.c dhcp-4.0.0/common/conflex.c >--- dhcp-4.0.0.ORIG/common/conflex.c 2008-09-01 13:50:55.000000000 +0100 >+++ dhcp-4.0.0/common/conflex.c 2008-09-01 13:52:55.000000000 +0100 >@@ -103,7 +103,7 @@ > struct parse **cfile; > { > /* "Memory" config files have no file. */ >- if ((*cfile)->file != -1) { >+ if ((*cfile)->file != -1 && (*cfile)->file != fileno(stdin)) { > munmap((*cfile)->inbuf, (*cfile)->bufsiz); > close((*cfile)->file); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 205214
:
150152
|
164239
|
164240
| 164242 |
164243
|
164245