summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2010-07-28 12:12:31 -0700
committerMarcel Holtmann <marcel@holtmann.org>2010-07-28 12:12:31 -0700
commit50c93bb8f825f9796ff2cf95f321276ccde592b2 (patch)
tree03c569c57fc4663aea74c5dbd10e1f0605988370 /scripts
parent4c1926e3c21240cc2658dc6696a44f304a5571e9 (diff)
downloadconnman-50c93bb8f825f9796ff2cf95f321276ccde592b2.tar.gz
connman-50c93bb8f825f9796ff2cf95f321276ccde592b2.tar.bz2
connman-50c93bb8f825f9796ff2cf95f321276ccde592b2.zip
Add some extra checks to dhclient callout script
Diffstat (limited to 'scripts')
-rw-r--r--scripts/dhclient-script.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/dhclient-script.c b/scripts/dhclient-script.c
index 841cde3d..35ede29a 100644
--- 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);