1 #!/bin/sh /usr/share/dpatch/dpatch-run
2 ## 063_misc_fixes.dpatch
8 diff -Naur .B/lib/cache.c .A/lib/cache.c
9 --- .B/lib/cache.c 2005-02-06 06:00:53.000000000 +0000
10 +++ .A/lib/cache.c 2007-01-07 21:36:35.000000000 +0000
15 - if (is_mounted(_PATH_MOUNTED, path))
16 + if (is_mounted(_PATH_MOUNTED, path)) {
22 mapent_hash[i] = me->next;
23 diff -Naur .B/modules/lookup_file.c .A/modules/lookup_file.c
24 --- .B/modules/lookup_file.c 2005-04-06 15:14:23.000000000 +0000
25 +++ .A/modules/lookup_file.c 2007-01-07 21:36:35.000000000 +0000
30 + if (kptr - key > KEY_MAX_LEN) {
36 else if (isspace(ch) && !escape) {
37 diff -Naur .B/modules/parse_sun.c .A/modules/parse_sun.c
38 --- .B/modules/parse_sun.c 2007-01-07 21:36:35.000000000 +0000
39 +++ .A/modules/parse_sun.c 2007-01-07 21:36:35.000000000 +0000
41 "mounting root %s, mountpoint %s, what %s, fstype %s, options %s\n",
42 root, mountpoint, what, fstype, options);
44 + /* A malformed entry of the form key /xyz will trigger this case */
45 + if (!what || *what == '\0')
48 if (!strcmp(fstype, "nfs")) {
49 rv = mount_nfs->mount_mount(root, mountpoint, strlen(mountpoint),
50 what, fstype, options, mount_nfs->context);
55 +static int key_exists(struct multi_mnt *list, char *path, int pathlen)
57 + struct multi_mnt *mmptr = list;
59 + while (mmptr && pathlen == strlen(mmptr->path)) {
60 + if (!strncmp(mmptr->path, path, pathlen))
62 + mmptr = mmptr->next;
68 * Build list of mounts in shortest -> longest order.
69 * Pass in list head and return list head.
74 + /* if a multimount entry has duplicate keys, it is invalid */
75 + if (key_exists(mmptr, path, plen)) {