summaryrefslogtreecommitdiff
path: root/package/dhcp-forwarder/patches
diff options
context:
space:
mode:
authorwbx <wbx@hydrogenium.(none)>2009-05-17 14:41:34 +0200
committerwbx <wbx@hydrogenium.(none)>2009-05-17 14:41:34 +0200
commit219a6dab8995aad9ac4860cc1a84d6f3509a03a4 (patch)
treeb9c0f3c43aebba2fcfef777592d0add39f2072f4 /package/dhcp-forwarder/patches
Initial import
Diffstat (limited to 'package/dhcp-forwarder/patches')
-rw-r--r--package/dhcp-forwarder/patches/00-big_endian.patch11
-rw-r--r--package/dhcp-forwarder/patches/01-getpwnmam_getgrnam.patch35
2 files changed, 46 insertions, 0 deletions
diff --git a/package/dhcp-forwarder/patches/00-big_endian.patch b/package/dhcp-forwarder/patches/00-big_endian.patch
new file mode 100644
index 000000000..add157d3f
--- /dev/null
+++ b/package/dhcp-forwarder/patches/00-big_endian.patch
@@ -0,0 +1,11 @@
+--- dhcp-forwarder-0.7/src/dhcp.h 2004-06-22 03:46:56.000000000 -0700
++++ dhcp-forwarder-0.7-x/src/dhcp.h 2005-10-06 17:04:14.000000000 -0700
+@@ -89,7 +89,7 @@
+ optDHCP_COOKIE = 0x63538263u,
+ flgDHCP_BCAST = 0x0080u
+ #else
+- DHCP_COOKIE = 0x63825363u,
++ optDHCP_COOKIE = 0x63825363u,
+ flgDHCP_BCAST = 0x8000u
+ #endif
+ };
diff --git a/package/dhcp-forwarder/patches/01-getpwnmam_getgrnam.patch b/package/dhcp-forwarder/patches/01-getpwnmam_getgrnam.patch
new file mode 100644
index 000000000..ef8491330
--- /dev/null
+++ b/package/dhcp-forwarder/patches/01-getpwnmam_getgrnam.patch
@@ -0,0 +1,35 @@
+diff -pur dhcp-forwarder-0.7-orig/src/wrappers.h dhcp-forwarder-0.7-patched/src/wrappers.h
+--- dhcp-forwarder-0.7-orig/src/wrappers.h 2004-06-22 12:46:56.000000000 +0200
++++ dhcp-forwarder-0.7-patched/src/wrappers.h 2005-12-27 12:28:10.464289435 +0100
+@@ -65,7 +65,14 @@ Egetgrnam(char const *name)
+ /*@*/
+ {
+ /*@observer@*/struct group const *res = getgrnam(name);
+- FatalErrnoError(res==0, 1, "getgrnam()");
++
++ FatalErrnoError((res == NULL) && (errno != 0), 1, "getgrnam()");
++
++ if (res == NULL)
++ {
++ fprintf (stderr, "No such group: `%s'\n", name);
++ exit (1);
++ }
+
+ /*@-freshtrans@*/
+ /*@-mustfreefresh@*/
+@@ -80,7 +87,14 @@ Egetpwnam(char const *name)
+ /*@*/
+ {
+ struct passwd const *res = getpwnam(name);
+- FatalErrnoError(res==0, 1, "getpwnam()");
++
++ FatalErrnoError((res == NULL) && (errno != 0), 1, "getpwnam()");
++
++ if (res == NULL)
++ {
++ fprintf (stderr, "No such user: `%s'\n", name);
++ exit (1);
++ }
+
+ return res;
+ }