[SCM] Samba Shared Repository - branch master updated
Jeremy Allison
jra at samba.org
Sat Oct 8 03:23:02 UTC 2016
The branch, master has been updated
via b3d938c s3-sysquotas: correctly restore path when finding mount point
from 06281e8 vfs_glusterfs: Fix a memory leak in connect path
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit b3d938c9c03e8b726e966ccb979b09bd21e89f32
Author: Uri Simchoni <uri at samba.org>
Date: Fri Oct 7 11:05:07 2016 +0300
s3-sysquotas: correctly restore path when finding mount point
When traversing the path backwards to find the mount point, if the
root '/' is reached, then the character to be restored is not a '/'.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12273
Signed-off-by: Uri Simchoni <uri at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Sat Oct 8 05:22:25 CEST 2016 on sn-devel-144
-----------------------------------------------------------------------
Summary of changes:
source3/lib/sysquotas.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
Changeset truncated at 500 lines:
diff --git a/source3/lib/sysquotas.c b/source3/lib/sysquotas.c
index c2d09da..eef87be 100644
--- a/source3/lib/sysquotas.c
+++ b/source3/lib/sysquotas.c
@@ -82,6 +82,8 @@ static int sys_path_to_bdev(const char *path, char **mntpath, char **bdev, char
}
while (true) {
+ char save_ch;
+
p = strrchr(stat_mntpath, '/');
if (p == NULL) {
DBG_ERR("realpath for %s does not begin with a '/'\n",
@@ -93,6 +95,7 @@ static int sys_path_to_bdev(const char *path, char **mntpath, char **bdev, char
++p;
}
+ save_ch = *p;
*p = 0;
if (sys_stat(stat_mntpath, &S, false) != 0) {
DBG_WARNING("cannot stat real path component %s - %s\n",
@@ -100,7 +103,7 @@ static int sys_path_to_bdev(const char *path, char **mntpath, char **bdev, char
goto out;
}
if (S.st_ex_dev != devno) {
- *p = '/';
+ *p = save_ch;
break;
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list