[SCM] Samba Shared Repository - branch v3-2-test updated -
initial-v3-2-unstable-345-gb409f1c
Jeremy Allison
jra at samba.org
Wed Nov 21 01:54:39 GMT 2007
The branch, v3-2-test has been updated
via b409f1c3356a72216136411234b345666159c88b (commit)
from 15074de938539e7a9c527d9a6d81792adc2ac3d0 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit b409f1c3356a72216136411234b345666159c88b
Author: Jeremy Allison <jra at samba.org>
Date: Tue Nov 20 17:54:01 2007 -0800
Ensure we have a talloc stackframe (found by Kukks).
Jeremy.
-----------------------------------------------------------------------
Summary of changes:
source/client/smbmount.c | 2 ++
source/client/smbumount.c | 14 ++++++++------
2 files changed, 10 insertions(+), 6 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/client/smbmount.c b/source/client/smbmount.c
index 5e69cf9..99dc99f 100644
--- a/source/client/smbmount.c
+++ b/source/client/smbmount.c
@@ -864,6 +864,7 @@ static void parse_mount_smb(int argc, char **argv)
****************************************************************************/
int main(int argc,char *argv[])
{
+ TALLOC_CTX *frame = talloc_stackframe();
char *p;
DEBUGLEVEL = 1;
@@ -940,5 +941,6 @@ static void parse_mount_smb(int argc, char **argv)
strupper_m(my_netbios_name);
init_mount();
+ TALLOC_FREE(frame);
return 0;
}
diff --git a/source/client/smbumount.c b/source/client/smbumount.c
index 1664e4b..e74c312 100644
--- a/source/client/smbumount.c
+++ b/source/client/smbumount.c
@@ -44,13 +44,13 @@ umount_ok(const char *mount_point)
umount filesystems they don't own */
int fid = open(mount_point, O_RDONLY|O_NOFOLLOW, 0);
__kernel_uid32_t mount_uid;
-
+
if (fid == -1) {
fprintf(stderr, "Could not open %s: %s\n",
mount_point, strerror(errno));
return -1;
}
-
+
if (ioctl(fid, SMB_IOC_GETMOUNTUID32, &mount_uid) != 0) {
__kernel_uid_t mount_uid16;
if (ioctl(fid, SMB_IOC_GETMOUNTUID, &mount_uid16) != 0) {
@@ -94,7 +94,7 @@ canonicalize (char *path)
if (path == NULL)
return NULL;
-
+
if (realpath (path, canonical))
return canonical;
@@ -104,7 +104,7 @@ canonicalize (char *path)
}
-int
+int
main(int argc, char *argv[])
{
int fd;
@@ -112,6 +112,7 @@ main(int argc, char *argv[])
struct mntent *mnt;
FILE* mtab;
FILE* new_mtab;
+ TALLOC_CTX *frame = talloc_stackframe();
if (argc != 2) {
usage();
@@ -146,7 +147,7 @@ main(int argc, char *argv[])
return 1;
}
close(fd);
-
+
if ((mtab = setmntent(MOUNTED, "r")) == NULL) {
fprintf(stderr, "Can't open " MOUNTED ": %s\n",
strerror(errno));
@@ -190,5 +191,6 @@ main(int argc, char *argv[])
return 1;
}
+ TALLOC_FREE(frame);
return 0;
-}
+}
--
Samba Shared Repository
More information about the samba-cvs
mailing list