summaryrefslogtreecommitdiff
path: root/source3/lib/system.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-09-12 21:48:20 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:30:41 -0500
commit12f61e09d943ea7fc4149166077507b5b0b3b4e7 (patch)
tree8382cf512a97b3159c3cda38eb952c85f8f2237f /source3/lib/system.c
parent4754b0ec65a3be4380f3216bd3f59c1906db259b (diff)
downloadsamba-12f61e09d943ea7fc4149166077507b5b0b3b4e7.tar.gz
samba-12f61e09d943ea7fc4149166077507b5b0b3b4e7.tar.bz2
samba-12f61e09d943ea7fc4149166077507b5b0b3b4e7.zip
r25117: The mega-patch Jerry was waiting for. Remove all pstrings from
the main server code paths. We should now be able to cope with paths up to PATH_MAX length now. Final job will be to add the TALLOC_CTX * parameter to unix_convert to make it explicit (for Volker). Jeremy. (This used to be commit 7f0db75fb0f24873577dcb758a2ecee74fdc4297)
Diffstat (limited to 'source3/lib/system.c')
-rw-r--r--source3/lib/system.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/lib/system.c b/source3/lib/system.c
index 9cef818fab..6c79b362a8 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -573,7 +573,11 @@ char *sys_getwd(char *s)
{
char *wd;
#ifdef HAVE_GETCWD
+#ifdef PATH_MAX
+ wd = (char *)getcwd(s, PATH_MAX);
+#else
wd = (char *)getcwd(s, sizeof (pstring));
+#endif
#else
wd = (char *)getwd(s);
#endif