summaryrefslogtreecommitdiff
path: root/source3/torture/cmd_vfs.c
diff options
context:
space:
mode:
authorAlexander Bokovoy <ab@samba.org>2003-08-27 20:04:23 +0000
committerAlexander Bokovoy <ab@samba.org>2003-08-27 20:04:23 +0000
commitda0397bd2f1d4e299358a193a5223610571a9ae2 (patch)
treefe3425cdf2872032a05317dbf9f6cb2c6b0f4cba /source3/torture/cmd_vfs.c
parent46765d97fae2930836582a2590a4bfb9f2a78e9a (diff)
downloadsamba-da0397bd2f1d4e299358a193a5223610571a9ae2.tar.gz
samba-da0397bd2f1d4e299358a193a5223610571a9ae2.tar.bz2
samba-da0397bd2f1d4e299358a193a5223610571a9ae2.zip
Add CAP VFS module from Monyo. Primary purpose of this module is to provide CAP-compatible encoded file names for CJKV
(This used to be commit e8a5a962ed2218144cbb9c593d8e996c7d034b0c)
Diffstat (limited to 'source3/torture/cmd_vfs.c')
-rw-r--r--source3/torture/cmd_vfs.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/source3/torture/cmd_vfs.c b/source3/torture/cmd_vfs.c
index d91dbf50e0..8317a57a20 100644
--- a/source3/torture/cmd_vfs.c
+++ b/source3/torture/cmd_vfs.c
@@ -490,8 +490,8 @@ static NTSTATUS cmd_stat(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, c
int ret;
const char *user;
const char *group;
- struct passwd *pwd;
- struct group *grp;
+ struct passwd *pwd = NULL;
+ struct group *grp = NULL;
SMB_STRUCT_STAT st;
if (argc != 2) {
@@ -533,6 +533,7 @@ static NTSTATUS cmd_stat(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, c
printf(" Access: %s", ctime(&(st.st_atime)));
printf(" Modify: %s", ctime(&(st.st_mtime)));
printf(" Change: %s", ctime(&(st.st_ctime)));
+
SAFE_FREE(pwd);
SAFE_FREE(grp);
return NT_STATUS_OK;
@@ -544,8 +545,8 @@ static NTSTATUS cmd_fstat(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc,
int fd;
const char *user;
const char *group;
- struct passwd *pwd;
- struct group *grp;
+ struct passwd *pwd = NULL;
+ struct group *grp = NULL;
SMB_STRUCT_STAT st;
if (argc != 2) {
@@ -596,6 +597,7 @@ static NTSTATUS cmd_fstat(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc,
printf(" Access: %s", ctime(&(st.st_atime)));
printf(" Modify: %s", ctime(&(st.st_mtime)));
printf(" Change: %s", ctime(&(st.st_ctime)));
+
SAFE_FREE(pwd);
SAFE_FREE(grp);
return NT_STATUS_OK;
@@ -606,8 +608,8 @@ static NTSTATUS cmd_lstat(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc,
{
const char *user;
const char *group;
- struct passwd *pwd;
- struct group *grp;
+ struct passwd *pwd = NULL;
+ struct group *grp = NULL;
SMB_STRUCT_STAT st;
if (argc != 2) {
@@ -647,6 +649,7 @@ static NTSTATUS cmd_lstat(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc,
printf(" Access: %s", ctime(&(st.st_atime)));
printf(" Modify: %s", ctime(&(st.st_mtime)));
printf(" Change: %s", ctime(&(st.st_ctime)));
+
SAFE_FREE(pwd);
SAFE_FREE(grp);
return NT_STATUS_OK;