Displaying 20 results from an estimated 224 matches for "path_max".
2007 May 14
1
`PATH_MAX' undeclared here (not in a function) in asterisk!
...o -> stereorize
[CC] streamplayer.c -> streamplayer.o
[LD] streamplayer.o -> streamplayer
[CC] aelparse.c -> aelparse.o
In file included from /usr/src/asterisk-1.4.2/include/asterisk.h:32,
from ael_lex.c:19:
/usr/src/asterisk-1.4.2/include/asterisk/paths.h:23: `PATH_MAX' undeclared here (not in a function)
/usr/src/asterisk-1.4.2/include/asterisk/paths.h:24: `PATH_MAX' undeclared here (not in a function)
/usr/src/asterisk-1.4.2/include/asterisk/paths.h:25: `PATH_MAX' undeclared here (not in a function)
/usr/src/asterisk-1.4.2/include/asterisk/paths.h:2...
2010 Mar 05
2
[PATCH] R ignores PATH_MAX and fails in long directories (PR#14228)
Full_Name: Murray Stokely
Version: 2.10.1
OS: Linux
Submission from: (NULL) (216.239.45.4)
The Defn.h header includes limits.h for PATH_MAX and then checks if it hasn't
been defined and if not sets something manually. Some of the R code uses
PATH_MAX but a lot of other functions in unix/sys-unix.c and main/startup.c just
hardcodes a limit of 256 characters.
In my environment this is not always enough, so I ran into this being a p...
2008 Apr 04
2
Re: Use PATH_MAX for pathname char arrays.
Hello,
Using PATH_MAX is not a good idea: POSIX says that that definition
is facultative, in case the system does not impose any limit on path
length. Some systems may also set PATH_MAX to a quite high value, and
we would hence consume a lot of stack.
Samuel
_______________________________________________
Xen-devel m...
2013 Jun 15
2
Patch for pigeonhole 0.4.0 avoiding PATH_MAX
Hi,
I recently downloaded and built dovecot-2.2.2 and
dovecot-2.2-pigeonhole-0.4.0 on GNU/Linux and GNU/Hurd. The changes
needed will be sent to the Debian maintainer shortly. Latest Debian
release is 2.1.7-7 and dovecot-2.1-pigeonhole-0.3.1. When building
dovecot-2.2.2 there were no PATH_MAX problems on GNU/Hurd, thank you for
that. However, pigeonhole 0.4.0 had one remaining PATH_MAX construct.
The attached patch solves this problem. It it good enough to be accepted
upstream? (According to the description of t_malloc, free is not needed,
right?)
Thanks,
Svante Signell
--------------...
2001 Feb 12
1
openssh bugs in snapshot for nextstep (fwd)
I was sent this from Mark Miller. Should we be using MAXPATHLEN
instead of PATH_MAX in the upstream tree? Not all systems define
PATH_MAX.
- Ben
--- sftp-int.c.orig Sat Feb 10 13:56:08 2001
+++ sftp-int.c Sun Feb 11 23:33:26 2001
@@ -435,5 +435,5 @@
unsigned long n_arg;
Attrib a, *aa;
- char path_buf[PATH_MAX];
+ char path_buf[MAXPATHLEN];...
2010 Jun 26
0
[MODULE] pwd
...-------------------------------------------------------- */
+
+/*
+ * Display present (current) working directory
+ */
+
+#include <errno.h>
+#include <stdio.h>
+#include <console.h>
+#include <unistd.h>
+#include <dirent.h>
+
+/* Size of path buffer string */
+#ifndef PATH_MAX
+# ifdef NAME_MAX
+# define PATH_MAX NAME_MAX
+# elif FILENAME_MAX
+# define PATH_MAX FILENAME_MAX
+# else
+# define PATH_MAX 256
+# endif /* NAME_MAX */
+#endif /* PATH_MAX */
+
+int main(void)
+{
+ int rv = 0;
+ char pwd[PATH_MAX], *pwdptr;
+
+ openconsole(&d...
2013 Aug 20
0
[patch] overcoming PATH_MAX - very long paths with rsync - integration of liblongpath
I need to migrate data from a Linux box (PATH_MAX 4096) to Solaris with
(PATH_MAX 1024) and it so happens that not only do paths longer than 1K actually
exist, but also is the application in no way bound to 4K paths.
In an effort to find a generic solution to these issues, I have written
liblongpath. See https://code.uplex.de/liblongpath - the...
2005 Jan 06
0
skip unconnected interfaces
...imeout = -1;
+static int only_connected = 0;
static int configured;
struct state {
@@ -290,6 +291,38 @@
return ret;
}
+static int ulong_from_sys_device_file(const char *path_prefix,
+ const char *dev_name,
+ const char *dev_file,
+ unsigned long *val)
+{
+ char t[PATH_MAX], p[255];
+ int i, fd, rc = -1;
+
+ i = snprintf(t, PATH_MAX-1, "%s/%s/%s", path_prefix, dev_name, dev_file);
+ if (i < 0 || i >= PATH_MAX-1)
+ goto done;
+ t[i] = '\0';
+ DEBUG(("%s(%s)\n", __func__, t));
+ if ((fd = open(t, O_RDONLY)) < 0) {
+ perror(t);
+...
2013 Apr 11
2
[PATCH 1/2] btrfs-progs: replace blkid_probe_get_wholedisk_devno
...m>
---
diff --git a/mkfs.c b/mkfs.c
index c8cb395..7df78fc 100644
--- a/mkfs.c
+++ b/mkfs.c
@@ -1215,9 +1215,8 @@ static int check_leaf_or_node_size(u32 size, u32 sectorsize)
static int is_ssd(const char *file)
{
- char *devname;
blkid_probe probe;
- char *dev;
+ char dev[32];
char path[PATH_MAX];
dev_t disk;
int fd;
@@ -1227,24 +1226,16 @@ static int is_ssd(const char *file)
if (!probe)
return 0;
- /*
- * We want to use blkid_devno_to_wholedisk() but it''s broken for some
- * reason on F17 at least so we''ll do this trickery
- */
- disk = blkid_probe_get_whol...
2007 May 15
0
PATH_MAX' undeclared here (not in a function) in asterisk!
hello, James FitzGibbon:
thank you for your help. i am very new to arm-linux and embedded linux. i think what you said is right. i am not very sure the steps i taken are correct. i post it here and please give me some help. it might be help other arm-linux users too. i installed all necessary libraries in my linux. if i just install asterisk under my linux. there is no problem. but when i
2010 Mar 21
0
[PATCH] Mac OS X: For PATH_MAX, include <limits.h>
...ject.org/wiki/MinGW http://www.annexia.org/fedora_mingw
-------------- next part --------------
>From 2f48ef1bfe1f8885f92c61c55c39f351a0412972 Mon Sep 17 00:00:00 2001
From: Richard Jones <rich at koneko.home.annexia.org>
Date: Sun, 21 Mar 2010 19:45:50 +0000
Subject: [PATCH] Mac OS X: For PATH_MAX, include <limits.h>
---
test-tool/test-tool.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/test-tool/test-tool.c b/test-tool/test-tool.c
index 57de78f..dad1f2e 100644
--- a/test-tool/test-tool.c
+++ b/test-tool/test-tool.c
@@ -30,6 +30,7 @@
#include <sys/stat...
2014 Sep 23
1
Re: [PATCH 09/13] syntax-check: fix prohibit_path_max_allocation check
On Tuesday 23 September 2014 17:20:35 Hu Tao wrote:
> Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
> ---
> daemon/inotify.c | 12 +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
While I'd personally get rid of PATH_MAX at all, I understand the Linux
inotify implementation relies on it...
>
> diff --git a/daemon/inotify.c b/daemon/inotify.c
> index 36e5ede..b847b7d 100644
> --- a/daemon/inotify.c
> +++ b/daemon/inotify.c
> @@ -309,7 +309,7 @@ do_inotify_files (void)
> unsigned int i;
>...
2014 Sep 27
2
[PATCH 1/2] Implement realpath()
...o \
--- /dev/null
+++ b/usr/klibc/realpath.c
@@ -0,0 +1,147 @@
+#include <errno.h>
+#include <limits.h>
+#include <stdlib.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+static char *__realpath(const char *name, char *resolved_name, int recurse)
+{
+ char link_target[PATH_MAX];
+ struct stat st;
+ char *p, *end;
+ size_t comp_len;
+ int link_len;
+ int exists = 1;
+ int is_dir = 1;
+
+ /* Keep or ignore base dir depending on whether name is relative */
+ p = resolved_name;
+ if (*name != '/')
+ p += strlen(p);
+
+ /* Find end of buffer */
+ end = resolved_name...
2011 May 05
0
Release of libvirt-0.9.1
...duce code duplication in error and success paths (Matthias Bolte)
- Replace REMOTE_DEBUG with VIR_DEBUG in daemon dispatcher (Daniel P. Berrange)
- Add missing checks for whether the connection is open in dispatcher (Daniel P. Berrange)
- PHYP: Adding network interface (Eduardo Otubo)
- xen: Remove PATH_MAX sized stack allocation from block stats code (Matthias Bolte)
- setmaxmem: add the new options to "virsh setmaxmem" command (Taku Izumi)
- maxmem: implement virDomainSetMaxMemory API of the qemu driver (Taku Izumi)
- maxmem: introduces VIR_DOMAIN_MEM_MAXIMUM flag (Taku Izumi)
- nwfilters:...
2011 Jul 05
6
[PATCH 1/7] ln: Check snprintf() return values
...ls/ln.c
+++ b/usr/utils/ln.c
@@ -9,7 +9,7 @@
int main(int argc, char *argv[])
{
- int c, s, f;
+ int c, s, f, len;
char *p;
struct stat sb;
@@ -56,10 +56,20 @@ int main(int argc, char *argv[])
p = strrchr(argv[c], '/');
p++;
- if (S_ISDIR(sb.st_mode))
- snprintf(target, PATH_MAX, "%s/%s", argv[argc - 1], p);
- else
- snprintf(target, PATH_MAX, "%s", argv[argc - 1]);
+ if (S_ISDIR(sb.st_mode)) {
+ len = snprintf(target, PATH_MAX, "%s/%s",
+ argv[argc - 1], p);
+ if (len >= PATH_MAX) {
+ fprintf(stderr, "snprintf di...
2016 Mar 28
2
Is it possible to extend log message?
Hello folks,
Is it possible to extend log message as large as PATH_MAX?
Current length of message format including file path is small against linux PATH_MAX, 4096.
diff --git a/log.c b/log.c
index ad12930..95df4a9 100644
--- a/log.c
+++ b/log.c
@@ -359,7 +359,7 @@ log_redirect_stderr_to(const char *logfile)
log_stderr_fd = fd;
}
-#define MSGBUFSIZ 1024
+#de...
2012 Feb 29
1
[PATCH 1/2] Check that directory path is not too long (found by Coverity).
From: "Richard W.M. Jones" <rjones at redhat.com>
Since we copy dirname + "/" + path to a fixed buffer of size PATH_MAX,
we need to check that the buffer cannot overflow.
---
helper/appliance.c | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/helper/appliance.c b/helper/appliance.c
index c4d0b32..05ad3e5 100644
--- a/helper/appliance.c
+++ b/helper/appliance.c
@@ -168,15 +168...
2003 Jun 10
1
Error with path names greater than 255 characters
...far)
rsync error: error in rsync protocol data stream (code 12) at io.c(165)
Here's what make produced after redefining the constants:
[root@festiva rsync-2.5.6]# make
gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -c rsync.c -o rsync.o
In file included from rsync.c:23:
rsync.h:325: warning: `PATH_MAX' redefined
/usr/include/linux/limits.h:14: warning: this is the location of the
previous definition
rsync.h:326: warning: `MAXPATHLEN' redefined
/usr/include/sys/param.h:35: warning: this is the location of the
previous definition
And checking for the previous values of PATH_MAX and MAX...
2009 Dec 16
2
Build fix on HURD
I've made two little patches to allow dovecot to be compiled on GNU/Hurd.
Could you review them?
Kind regards,
Marco Nenciarini
--
---------------------------------------------------------------------
| Marco Nenciarini | Debian/GNU Linux Developer - Plug Member |
| mnencia at prato.linux.it | http://www.prato.linux.it/~mnencia |
2018 Oct 28
0
[PATCH nbdkit 1/4] common: Move get_current_dir_name(3) compatibility function.
...GET_CURRENT_DIR_NAME_H
+#define NBDKIT_GET_CURRENT_DIR_NAME_H
+
+#include <config.h>
+
+#ifndef HAVE_GET_CURRENT_DIR_NAME
+
+#include <stdlib.h>
+#include <unistd.h>
+#include <limits.h>
+
+static inline char *
+get_current_dir_name (void)
+{
+ char *ret;
+
+ ret = malloc (PATH_MAX);
+ if (ret == NULL)
+ return NULL;
+ ret = getcwd (ret, PATH_MAX);
+ if (ret == NULL)
+ return NULL;
+ return realloc (ret, strlen (ret) + 1);
+}
+#endif
+
+#endif /* NBDKIT_GET_CURRENT_DIR_NAME_H */
diff --git a/src/Makefile.am b/src/Makefile.am
index 6b9e0a9..999aeae 100644
--- a/src/M...