diff options
author | Jeremy Allison <jra@samba.org> | 2010-11-19 16:29:26 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2010-11-20 02:15:50 +0100 |
commit | 2b788aa6ce41c5c0a6892cb412cf40a7cbc73f2a (patch) | |
tree | 38d9b916b7f46705d0fe027e86ccef413b5b2374 /source3/smbd/service.c | |
parent | 8585de88815490ed3c41571030bf20bff02a67d4 (diff) | |
download | samba-2b788aa6ce41c5c0a6892cb412cf40a7cbc73f2a.tar.gz |
Move the uglyness of #ifdef REALPATH_TAKES_NULL into the vfs_default
module, change the signature of VFS_REALPATH to always return a
malloc'ed string.
Needed to make some privileges work I plan on doing shortly
easier to code.
Jeremy.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Nov 20 02:15:50 CET 2010 on sn-devel-104
Diffstat (limited to 'source3/smbd/service.c')
-rw-r--r-- | source3/smbd/service.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/source3/smbd/service.c b/source3/smbd/service.c index 5b6d9087a3b..a58f17c0703 100644 --- a/source3/smbd/service.c +++ b/source3/smbd/service.c @@ -26,23 +26,14 @@ extern userdom_struct current_user_info; static bool canonicalize_connect_path(connection_struct *conn) { -#ifdef REALPATH_TAKES_NULL bool ret; - char *resolved_name = SMB_VFS_REALPATH(conn,conn->connectpath,NULL); + char *resolved_name = SMB_VFS_REALPATH(conn,conn->connectpath); if (!resolved_name) { return false; } ret = set_conn_connectpath(conn,resolved_name); SAFE_FREE(resolved_name); return ret; -#else - char resolved_name_buf[PATH_MAX+1]; - char *resolved_name = SMB_VFS_REALPATH(conn,conn->connectpath,resolved_name_buf); - if (!resolved_name) { - return false; - } - return set_conn_connectpath(conn,resolved_name); -#endif /* REALPATH_TAKES_NULL */ } /**************************************************************************** |