svn commit: samba r23761 - in branches: SAMBA_3_0/source/smbd SAMBA_3_0_26/source/smbd

vlendec at samba.org vlendec at samba.org
Mon Jul 9 09:43:45 GMT 2007


Author: vlendec
Date: 2007-07-09 09:43:41 +0000 (Mon, 09 Jul 2007)
New Revision: 23761

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23761

Log:
Rename reduce_name to check_reduced_name
    
The function name reduce_name is misleading, making the user believe it
changes an argument.


Modified:
   branches/SAMBA_3_0/source/smbd/filename.c
   branches/SAMBA_3_0/source/smbd/nttrans.c
   branches/SAMBA_3_0/source/smbd/trans2.c
   branches/SAMBA_3_0/source/smbd/vfs.c
   branches/SAMBA_3_0_26/source/smbd/filename.c
   branches/SAMBA_3_0_26/source/smbd/nttrans.c
   branches/SAMBA_3_0_26/source/smbd/trans2.c
   branches/SAMBA_3_0_26/source/smbd/vfs.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/filename.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/filename.c	2007-07-09 09:35:03 UTC (rev 23760)
+++ branches/SAMBA_3_0/source/smbd/filename.c	2007-07-09 09:43:41 UTC (rev 23761)
@@ -512,7 +512,7 @@
 }
 
 /****************************************************************************
- Check a filename - possibly caling reducename.
+ Check a filename - possibly calling check_reduced_name.
  This is called by every routine before it allows an operation on a filename.
  It does any final confirmation necessary to ensure that the filename is
  a valid one for the user to access.
@@ -529,7 +529,7 @@
 	}
 
 	if (!lp_widelinks(SNUM(conn)) || !lp_symlinks(SNUM(conn))) {
-		NTSTATUS status = reduce_name(conn,name);
+		NTSTATUS status = check_reduced_name(conn,name);
 		if (!NT_STATUS_IS_OK(status)) {
 			DEBUG(5,("check_name: name %s failed with %s\n",name, nt_errstr(status)));
 			return status;

Modified: branches/SAMBA_3_0/source/smbd/nttrans.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/nttrans.c	2007-07-09 09:35:03 UTC (rev 23760)
+++ branches/SAMBA_3_0/source/smbd/nttrans.c	2007-07-09 09:43:41 UTC (rev 23761)
@@ -1777,7 +1777,7 @@
 	}
 
 	/* Ensure this is within the share. */
-	status = reduce_name(conn, oldname);
+	status = check_reduced_name(conn, oldname);
 	if (!NT_STATUS_IS_OK(status)) {
 		return status;
 	}

Modified: branches/SAMBA_3_0/source/smbd/trans2.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/trans2.c	2007-07-09 09:35:03 UTC (rev 23760)
+++ branches/SAMBA_3_0/source/smbd/trans2.c	2007-07-09 09:43:41 UTC (rev 23761)
@@ -4177,7 +4177,7 @@
 	}
 
 	/* Ensure this is within the share. */
-	status = reduce_name(conn, oldname);
+	status = check_reduced_name(conn, oldname);
 	if (!NT_STATUS_IS_OK(status)) {
 		return status;
 	}

Modified: branches/SAMBA_3_0/source/smbd/vfs.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/vfs.c	2007-07-09 09:35:03 UTC (rev 23760)
+++ branches/SAMBA_3_0/source/smbd/vfs.c	2007-07-09 09:43:41 UTC (rev 23761)
@@ -802,7 +802,7 @@
  it is below dir in the heirachy. This uses realpath.
 ********************************************************************/
 
-NTSTATUS reduce_name(connection_struct *conn, const pstring fname)
+NTSTATUS check_reduced_name(connection_struct *conn, const char *fname)
 {
 #ifdef REALPATH_TAKES_NULL
 	BOOL free_resolved_name = True;

Modified: branches/SAMBA_3_0_26/source/smbd/filename.c
===================================================================
--- branches/SAMBA_3_0_26/source/smbd/filename.c	2007-07-09 09:35:03 UTC (rev 23760)
+++ branches/SAMBA_3_0_26/source/smbd/filename.c	2007-07-09 09:43:41 UTC (rev 23761)
@@ -512,7 +512,7 @@
 }
 
 /****************************************************************************
- Check a filename - possibly caling reducename.
+ Check a filename - possibly calling check_reduced_name.
  This is called by every routine before it allows an operation on a filename.
  It does any final confirmation necessary to ensure that the filename is
  a valid one for the user to access.
@@ -529,7 +529,7 @@
 	}
 
 	if (!lp_widelinks(SNUM(conn)) || !lp_symlinks(SNUM(conn))) {
-		NTSTATUS status = reduce_name(conn,name);
+		NTSTATUS status = check_reduced_name(conn,name);
 		if (!NT_STATUS_IS_OK(status)) {
 			DEBUG(5,("check_name: name %s failed with %s\n",name, nt_errstr(status)));
 			return status;

Modified: branches/SAMBA_3_0_26/source/smbd/nttrans.c
===================================================================
--- branches/SAMBA_3_0_26/source/smbd/nttrans.c	2007-07-09 09:35:03 UTC (rev 23760)
+++ branches/SAMBA_3_0_26/source/smbd/nttrans.c	2007-07-09 09:43:41 UTC (rev 23761)
@@ -1772,7 +1772,7 @@
 	}
 
 	/* Ensure this is within the share. */
-	status = reduce_name(conn, oldname);
+	status = check_reduced_name(conn, oldname);
 	if (!NT_STATUS_IS_OK(status)) {
 		return status;
 	}

Modified: branches/SAMBA_3_0_26/source/smbd/trans2.c
===================================================================
--- branches/SAMBA_3_0_26/source/smbd/trans2.c	2007-07-09 09:35:03 UTC (rev 23760)
+++ branches/SAMBA_3_0_26/source/smbd/trans2.c	2007-07-09 09:43:41 UTC (rev 23761)
@@ -4123,7 +4123,7 @@
 	}
 
 	/* Ensure this is within the share. */
-	status = reduce_name(conn, oldname);
+	status = check_reduced_name(conn, oldname);
 	if (!NT_STATUS_IS_OK(status)) {
 		return status;
 	}

Modified: branches/SAMBA_3_0_26/source/smbd/vfs.c
===================================================================
--- branches/SAMBA_3_0_26/source/smbd/vfs.c	2007-07-09 09:35:03 UTC (rev 23760)
+++ branches/SAMBA_3_0_26/source/smbd/vfs.c	2007-07-09 09:43:41 UTC (rev 23761)
@@ -802,7 +802,7 @@
  it is below dir in the heirachy. This uses realpath.
 ********************************************************************/
 
-NTSTATUS reduce_name(connection_struct *conn, const pstring fname)
+NTSTATUS check_reduced_name(connection_struct *conn, const char *fname)
 {
 #ifdef REALPATH_TAKES_NULL
 	BOOL free_resolved_name = True;



More information about the samba-cvs mailing list