git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cdb765a
)
Remove a variable used just once
author
Volker Lendecke
<vl@samba.org>
Fri, 30 Jan 2009 14:04:44 +0000
(15:04 +0100)
committer
Volker Lendecke
<vl@samba.org>
Tue, 2 Jun 2009 09:58:22 +0000
(11:58 +0200)
source3/smbd/vfs.c
patch
|
blob
|
history
diff --git
a/source3/smbd/vfs.c
b/source3/smbd/vfs.c
index 0f706697726ad71d615ebc69c770b97639c30312..bc6fd18b8ea6997c53522887c1702dd53afa93ed 100644
(file)
--- a/
source3/smbd/vfs.c
+++ b/
source3/smbd/vfs.c
@@
-871,7
+871,6
@@
NTSTATUS check_reduced_name(connection_struct *conn, const char *fname)
bool free_resolved_name = False;
#endif
char *resolved_name = NULL;
bool free_resolved_name = False;
#endif
char *resolved_name = NULL;
- size_t con_path_len = strlen(conn->connectpath);
char *p = NULL;
DEBUG(3,("reduce_name [%s] [%s]\n", fname, conn->connectpath));
char *p = NULL;
DEBUG(3,("reduce_name [%s] [%s]\n", fname, conn->connectpath));
@@
-957,7
+956,9
@@
NTSTATUS check_reduced_name(connection_struct *conn, const char *fname)
}
/* Check for widelinks allowed. */
}
/* Check for widelinks allowed. */
- if (!lp_widelinks(SNUM(conn)) && (strncmp(conn->connectpath, resolved_name, con_path_len) != 0)) {
+ if (!lp_widelinks(SNUM(conn))
+ && (strncmp(conn->connectpath, resolved_name,
+ strlen(conn->connectpath)) != 0)) {
DEBUG(2, ("reduce_name: Bad access attempt: %s is a symlink outside the share path", fname));
if (free_resolved_name) {
SAFE_FREE(resolved_name);
DEBUG(2, ("reduce_name: Bad access attempt: %s is a symlink outside the share path", fname));
if (free_resolved_name) {
SAFE_FREE(resolved_name);