#include "includes.h"
+#include "smbd/smbd.h"
/* cap functions */
static char *capencode(TALLOC_CTX *ctx, const char *from);
}
DEBUG(3,("cap: cap_readdir: %s\n", newname));
newnamelen = strlen(newname)+1;
- newdirent = (SMB_STRUCT_DIRENT *)TALLOC_ARRAY(talloc_tos(),
+ newdirent = (SMB_STRUCT_DIRENT *)talloc_array(talloc_tos(),
char,
sizeof(SMB_STRUCT_DIRENT)+
newnamelen);
return SMB_VFS_NEXT_MKNOD(handle, cappath, mode, dev);
}
-static char *cap_realpath(vfs_handle_struct *handle, const char *path, char *resolved_path)
+static char *cap_realpath(vfs_handle_struct *handle, const char *path)
{
/* monyo need capencode'ed and capdecode'ed? */
char *cappath = capencode(talloc_tos(), path);
errno = ENOMEM;
return NULL;
}
- return SMB_VFS_NEXT_REALPATH(handle, path, resolved_path);
+ return SMB_VFS_NEXT_REALPATH(handle, cappath);
}
static int cap_chmod_acl(vfs_handle_struct *handle, const char *path, mode_t mode)
.readdir = cap_readdir,
.mkdir = cap_mkdir,
.rmdir = cap_rmdir,
- .open = cap_open,
+ .open_fn = cap_open,
.rename = cap_rename,
.stat = cap_stat,
.lstat = cap_lstat,
}
len++;
- to = TALLOC_ARRAY(ctx, char, len);
+ to = talloc_array(ctx, char, len);
if (!to) {
return NULL;
}
size_t len = 0;
for (p1 = from; *p1; len++) {
- if (is_hex(from)) {
+ if (is_hex(p1)) {
p1 += 3;
} else {
p1++;
}
}
+ len++;
- to = TALLOC_ARRAY(ctx, char, len);
+ to = talloc_array(ctx, char, len);
if (!to) {
return NULL;
}