From 1cee71713f75dbee653ea86bd4e7c87efe677cf6 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 31 May 2011 16:14:04 -0700 Subject: Change sys_getcd() to take no arguments and always return malloc'ed memory (or NULL). Part of the efforts to remove PATH_MAX on modern systems. --- source3/modules/vfs_default.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source3/modules') diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index 4d06a10f42..faacf25599 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -753,9 +753,11 @@ static char *vfswrap_getwd(vfs_handle_struct *handle, char *path) char *result; START_PROFILE(syscall_getwd); - result = sys_getwd(path); + result = sys_getwd(); END_PROFILE(syscall_getwd); - return result; + /* FIXME - with a VFS change. JRA !! */ + strlcpy(path, result, PATH_MAX); + return path; } /********************************************************************* -- cgit