Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
D
Dnsmasq
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
Dnsmasq
Commits
8b3ae2fd
Commit
8b3ae2fd
authored
Jun 13, 2012
by
Simon Kelley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check tftp-root exists and is accessible at startup.
parent
ed55cb66
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
1 deletion
+39
-1
CHANGELOG
CHANGELOG
+6
-0
src/dnsmasq.c
src/dnsmasq.c
+31
-0
src/dnsmasq.h
src/dnsmasq.h
+1
-0
src/option.c
src/option.c
+1
-1
No files found.
CHANGELOG
View file @
8b3ae2fd
version 2.63
version 2.63
Do duplicate dhcp-host address check in --test mode.
Do duplicate dhcp-host address check in --test mode.
Check that tftp-root directories are accessible before
start-up. Thanks to Daniel Veillard for the initial patch.
Allow more than one --tfp-root flag. The per-interface
stuff is pointless without that.
version 2.62
version 2.62
Update German translation. Thanks to Conrad Kostecki.
Update German translation. Thanks to Conrad Kostecki.
...
...
src/dnsmasq.c
View file @
8b3ae2fd
...
@@ -498,6 +498,34 @@ int main (int argc, char **argv)
...
@@ -498,6 +498,34 @@ int main (int argc, char **argv)
prctl
(
PR_SET_DUMPABLE
,
1
,
0
,
0
,
0
);
prctl
(
PR_SET_DUMPABLE
,
1
,
0
,
0
,
0
);
#endif
#endif
#ifdef HAVE_TFTP
if
(
daemon
->
tftp_unlimited
||
daemon
->
tftp_interfaces
)
{
DIR
*
dir
;
struct
tftp_prefix
*
p
;
if
(
daemon
->
tftp_prefix
)
{
if
(
!
((
dir
=
opendir
(
daemon
->
tftp_prefix
))))
{
send_event
(
err_pipe
[
1
],
EVENT_TFTP_ERR
,
errno
,
daemon
->
tftp_prefix
);
_exit
(
0
);
}
closedir
(
dir
);
}
for
(
p
=
daemon
->
if_prefix
;
p
;
p
=
p
->
next
)
{
if
(
!
((
dir
=
opendir
(
p
->
prefix
))))
{
send_event
(
err_pipe
[
1
],
EVENT_TFTP_ERR
,
errno
,
p
->
prefix
);
_exit
(
0
);
}
closedir
(
dir
);
}
}
#endif
if
(
daemon
->
port
==
0
)
if
(
daemon
->
port
==
0
)
my_syslog
(
LOG_INFO
,
_
(
"started, version %s DNS disabled"
),
VERSION
);
my_syslog
(
LOG_INFO
,
_
(
"started, version %s DNS disabled"
),
VERSION
);
else
if
(
daemon
->
cachesize
!=
0
)
else
if
(
daemon
->
cachesize
!=
0
)
...
@@ -995,6 +1023,9 @@ static void fatal_event(struct event_desc *ev, char *msg)
...
@@ -995,6 +1023,9 @@ static void fatal_event(struct event_desc *ev, char *msg)
case
EVENT_LUA_ERR
:
case
EVENT_LUA_ERR
:
die
(
_
(
"failed to load Lua script: %s"
),
msg
,
EC_MISC
);
die
(
_
(
"failed to load Lua script: %s"
),
msg
,
EC_MISC
);
case
EVENT_TFTP_ERR
:
die
(
_
(
"TFTP directory %s inaccessible: %s"
),
msg
,
EC_FILE
);
}
}
}
}
...
...
src/dnsmasq.h
View file @
8b3ae2fd
...
@@ -159,6 +159,7 @@ struct event_desc {
...
@@ -159,6 +159,7 @@ struct event_desc {
#define EVENT_LOG_ERR 17
#define EVENT_LOG_ERR 17
#define EVENT_FORK_ERR 18
#define EVENT_FORK_ERR 18
#define EVENT_LUA_ERR 19
#define EVENT_LUA_ERR 19
#define EVENT_TFTP_ERR 20
/* Exit codes. */
/* Exit codes. */
#define EC_GOOD 0
#define EC_GOOD 0
...
...
src/option.c
View file @
8b3ae2fd
...
@@ -341,7 +341,7 @@ static struct {
...
@@ -341,7 +341,7 @@ static struct {
{
LOPT_NO_NAMES
,
ARG_DUP
,
"[=tag:<tag>]..."
,
gettext_noop
(
"Ignore hostnames provided by DHCP clients."
),
NULL
},
{
LOPT_NO_NAMES
,
ARG_DUP
,
"[=tag:<tag>]..."
,
gettext_noop
(
"Ignore hostnames provided by DHCP clients."
),
NULL
},
{
LOPT_OVERRIDE
,
OPT_NO_OVERRIDE
,
NULL
,
gettext_noop
(
"Do NOT reuse filename and server fields for extra DHCP options."
),
NULL
},
{
LOPT_OVERRIDE
,
OPT_NO_OVERRIDE
,
NULL
,
gettext_noop
(
"Do NOT reuse filename and server fields for extra DHCP options."
),
NULL
},
{
LOPT_TFTP
,
ARG_DUP
,
"[=<interface>]"
,
gettext_noop
(
"Enable integrated read-only TFTP server."
),
NULL
},
{
LOPT_TFTP
,
ARG_DUP
,
"[=<interface>]"
,
gettext_noop
(
"Enable integrated read-only TFTP server."
),
NULL
},
{
LOPT_PREFIX
,
ARG_
ONE
,
"<dir>[,<iface>]"
,
gettext_noop
(
"Export files by TFTP only from the specified subtree."
),
NULL
},
{
LOPT_PREFIX
,
ARG_
DUP
,
"<dir>[,<iface>]"
,
gettext_noop
(
"Export files by TFTP only from the specified subtree."
),
NULL
},
{
LOPT_APREF
,
OPT_TFTP_APREF
,
NULL
,
gettext_noop
(
"Add client IP address to tftp-root."
),
NULL
},
{
LOPT_APREF
,
OPT_TFTP_APREF
,
NULL
,
gettext_noop
(
"Add client IP address to tftp-root."
),
NULL
},
{
LOPT_SECURE
,
OPT_TFTP_SECURE
,
NULL
,
gettext_noop
(
"Allow access only to files owned by the user running dnsmasq."
),
NULL
},
{
LOPT_SECURE
,
OPT_TFTP_SECURE
,
NULL
,
gettext_noop
(
"Allow access only to files owned by the user running dnsmasq."
),
NULL
},
{
LOPT_TFTP_MAX
,
ARG_ONE
,
"<integer>"
,
gettext_noop
(
"Maximum number of conncurrent TFTP transfers (defaults to %s)."
),
"#"
},
{
LOPT_TFTP_MAX
,
ARG_ONE
,
"<integer>"
,
gettext_noop
(
"Maximum number of conncurrent TFTP transfers (defaults to %s)."
),
"#"
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment