projects
/
platform
/
upstream
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4c1926e
)
Add some extra checks to dhclient callout script
author
Marcel Holtmann
<marcel@holtmann.org>
Wed, 28 Jul 2010 19:12:31 +0000
(12:12 -0700)
committer
Marcel Holtmann
<marcel@holtmann.org>
Wed, 28 Jul 2010 19:12:31 +0000
(12:12 -0700)
scripts/dhclient-script.c
patch
|
blob
|
history
diff --git
a/scripts/dhclient-script.c
b/scripts/dhclient-script.c
index
841cde3
..
35ede29
100644
(file)
--- a/
scripts/dhclient-script.c
+++ b/
scripts/dhclient-script.c
@@
-66,10
+66,16
@@
int main(int argc, char *argv[])
busintf = getenv("BUSINTF");
buspath = getenv("BUSPATH");
+ if (busname == NULL || busintf == NULL || buspath == NULL)
+ return 0;
+
pid = atoi(getenv("pid"));
reason = getenv("reason");
interface = getenv("interface");
+ if (pid == 0 || reason == NULL)
+ return 0;
+
dbus_error_init(&error);
conn = dbus_bus_get(DBUS_BUS_SYSTEM, &error);