View | Details | Raw Unified | Return to bug 175812
Collapse All | Expand All

(-)findutils/Makefile (-3 / +2 lines)
Lines 6-13 Link Here
6
#
6
#
7
7
8
PORTNAME=	findutils
8
PORTNAME=	findutils
9
PORTVERSION=	4.5.10
9
PORTVERSION=	4.5.11
10
PORTREVISION=	2
11
CATEGORIES=	misc
10
CATEGORIES=	misc
12
MASTER_SITES=	${MASTER_SITE_GNU_ALPHA}
11
MASTER_SITES=	${MASTER_SITE_GNU_ALPHA}
13
MASTER_SITE_SUBDIR=	findutils
12
MASTER_SITE_SUBDIR=	findutils
Lines 37-43 Link Here
37
MAKE_JOBS_SAFE=	yes
36
MAKE_JOBS_SAFE=	yes
38
37
39
INFO=		find find-maint
38
INFO=		find find-maint
40
MAN1=		gfind.1 gxargs.1 glocate.1 gupdatedb.1
39
MAN1=		gfind.1 gxargs.1 glocate.1 gupdatedb.1 goldfind.1
41
MAN5=		glocatedb.5
40
MAN5=		glocatedb.5
42
41
43
LOCALSTATEDIR?=	/var/db
42
LOCALSTATEDIR?=	/var/db
(-)findutils/distinfo (-4 / +4 lines)
Lines 1-4 Link Here
1
SHA256 (findutils-4.5.10.tar.gz) = fe24bbce55ac8f136080e01c03e7ae8b5ab395550625c25860efcbbe0641af76
1
SHA256 (findutils-4.5.11.tar.gz) = 75e823592d917f1ac853a35cf46d6deeeb3b984240331ad1723f60da1a725d22
2
SIZE (findutils-4.5.10.tar.gz) = 2745375
2
SIZE (findutils-4.5.11.tar.gz) = 3116431
3
SHA256 (findutils-4.5.10.tar.gz.sig) = 072d3b0dee701cddba58088fc271c09d964410054562d666440f187bef47be8b
3
SHA256 (findutils-4.5.11.tar.gz.sig) = 4fd79ba6ab6acd7e340ad8878ae82112a503ef1f708fd5ba02cb94fe4a66d27f
4
SIZE (findutils-4.5.10.tar.gz.sig) = 152
4
SIZE (findutils-4.5.11.tar.gz.sig) = 152
(-)findutils/files/patch-gnulib-lib-fdopendir.c (-3 / +2 lines)
Lines 1-5 Link Here
1
--- gnulib/lib/fdopendir.c.orig	2011-04-02 15:37:38.000000000 +0000
1
--- gl/lib/fdopendir.c.orig	2012-12-15 14:42:45.000000000 +0100
2
+++ gnulib/lib/fdopendir.c	2011-05-30 21:05:02.000000000 +0000
2
+++ gl/lib/fdopendir.c	2013-02-02 17:11:52.000000000 +0100
3
@@ -182,9 +182,11 @@
3
@@ -182,9 +182,11 @@
4
 
4
 
5
 # include <errno.h>
5
 # include <errno.h>
Lines 12-15 Link Here
12
 /* Like fdopendir, but work around GNU/Hurd bug by validating FD.  */
12
 /* Like fdopendir, but work around GNU/Hurd bug by validating FD.  */
13
 
13
 
14
 DIR *
14
 DIR *
15
(-)findutils/files/patch-locate__locate.c (+154 lines)
Line 0 Link Here
1
diff locate/locate.c.orig locate/locate.c
2
--- locate/locate.c.orig
3
+++ locate/locate.c
4
@@ -1546,12 +1546,19 @@ opendb (const char *name)
5
   return fd;
6
 }
7
 
8
+static void
9
+cleanup_quote_opts (void)
10
+{
11
+  free (quote_opts);
12
+}
13
+
14
+
15
 int
16
 dolocate (int argc, char **argv, int secure_db_fd)
17
 {
18
-  char *path_element;
19
+  char *path_element = NULL;
20
   size_t path_element_pos, path_element_len;
21
-  const char *locate_path;
22
+  const char *user_selected_locate_path;
23
   const char *db_name;
24
   const char *path_separators = ":";
25
   unsigned long int found = 0uL;
26
@@ -1565,7 +1572,6 @@ dolocate (int argc, char **argv, int secure_db_fd)
27
   int stats = 0;
28
   int op_and = 0;
29
   FILE *fp;
30
-  int they_chose_db = 0;
31
   bool did_stdin = false;       /* Set to prevent rereading stdin. */
32
 
33
   if (argv[0])
34
@@ -1580,19 +1586,19 @@ dolocate (int argc, char **argv, int secure_db_fd)
35
   textdomain (PACKAGE);
36
   atexit (close_stdout);
37
 
38
+  quote_opts = clone_quoting_options (NULL);
39
+  atexit (cleanup_quote_opts);
40
+
41
   limits.limit = 0;
42
   limits.items_accepted = 0;
43
 
44
-  quote_opts = clone_quoting_options (NULL);
45
   print_quoted_filename = true;
46
 
47
   /* We cannot simultaneously trust $LOCATE_PATH and use the
48
    * setuid-access-controlled database,, since that could cause a leak
49
    * of private data.
50
    */
51
-  locate_path = getenv ("LOCATE_PATH");
52
-  if (locate_path)
53
-    they_chose_db = 1;
54
+  user_selected_locate_path = getenv ("LOCATE_PATH");
55
 
56
   check_existence = ACCEPT_EITHER;
57
 
58
@@ -1624,8 +1630,8 @@ dolocate (int argc, char **argv, int secure_db_fd)
59
           break;
60
 
61
         case 'd':
62
-          locate_path = optarg;
63
-          they_chose_db = 1;
64
+          user_selected_locate_path = optarg;
65
+	  assert (optarg != NULL);
66
           break;
67
 
68
         case 'e':
69
@@ -1715,7 +1721,7 @@ dolocate (int argc, char **argv, int secure_db_fd)
70
   /* If the user gave the -d option or set LOCATE_PATH,
71
    * relinquish access to the secure database.
72
    */
73
-  if (they_chose_db)
74
+  if (user_selected_locate_path)
75
     {
76
       if (secure_db_fd >= 0)
77
         {
78
@@ -1741,15 +1747,16 @@ dolocate (int argc, char **argv, int secure_db_fd)
79
         }
80
     }
81
 
82
-
83
   if (1 == isatty (STDOUT_FILENO))
84
     stdout_is_a_tty = true;
85
   else
86
     stdout_is_a_tty = false;
87
 
88
-  if (they_chose_db)
89
-    splitstring (locate_path, path_separators, true,
90
-                 &path_element_pos, &path_element_len);
91
+  if (user_selected_locate_path)
92
+    {
93
+      splitstring (user_selected_locate_path, path_separators, true,
94
+		   &path_element_pos, &path_element_len);
95
+    }
96
 
97
   /* Bail out early if limit already reached. */
98
   while (!use_limit || limits.limit > limits.items_accepted)
99
@@ -1765,10 +1772,11 @@ dolocate (int argc, char **argv, int secure_db_fd)
100
       statistics.newline_count =
101
       statistics.highbit_filename_count = 0u;
102
 
103
-      if (they_chose_db)
104
+      if (user_selected_locate_path)
105
         {
106
           /* Take the next element from the list of databases */
107
-          if (1 == path_element_len && '-' == locate_path[path_element_pos])
108
+          if (1 == path_element_len
109
+	      && '-' == user_selected_locate_path[path_element_pos])
110
             {
111
               if (did_stdin)
112
                 {
113
@@ -1787,13 +1795,13 @@ dolocate (int argc, char **argv, int secure_db_fd)
114
             {
115
               if (0 == path_element_len
116
                   || (1 == path_element_len
117
-                      && '.' == locate_path[path_element_pos]))
118
+                      && '.' == user_selected_locate_path[path_element_pos]))
119
                 {
120
                   db_name = LOCATE_DB;
121
                 }
122
               else
123
                 {
124
-                  path_element = strndup (&locate_path[path_element_pos],
125
+                  path_element = strndup (&user_selected_locate_path[path_element_pos],
126
                                           path_element_len);
127
                   db_name = path_element;
128
                 }
129
@@ -1889,11 +1897,20 @@ dolocate (int argc, char **argv, int secure_db_fd)
130
           free (path_element);
131
           path_element = NULL;
132
         }
133
-      if (!splitstring (locate_path, path_separators, false,
134
-                        &path_element_pos, &path_element_len))
135
-        {
136
-          break;
137
-        }
138
+
139
+       if (!user_selected_locate_path)
140
+	 {
141
+	   /* We're not actually iterating through the values in
142
+	      $LOCATE_PATH so we don't want to check for the next
143
+	      element in user_selected_locate_path (since we manually set db_name =
144
+	      LOCATE_DB without using user_selected_locate_path). */
145
+	   break;
146
+	 }
147
+       else if (!splitstring (user_selected_locate_path, path_separators, false,
148
+			      &path_element_pos, &path_element_len))
149
+	 {
150
+	   break;
151
+	 }
152
     }
153
 
154
   if (just_count)

Return to bug 175812