diff options
author | Jeremy Allison <jra@samba.org> | 2005-03-22 02:14:38 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:56:09 -0500 |
commit | 442b9f3e87ee7f9fe8c100cd37c9591733e290e6 (patch) | |
tree | 48b82139432a30df11afc0a74a4e7c05774fd9cd /source3/lib | |
parent | b824fcb0813b9ec5e2ca2b7f5208f9857f46108a (diff) | |
download | samba-442b9f3e87ee7f9fe8c100cd37c9591733e290e6.tar.gz samba-442b9f3e87ee7f9fe8c100cd37c9591733e290e6.tar.bz2 samba-442b9f3e87ee7f9fe8c100cd37c9591733e290e6.zip |
r5933: We were handling setting of EA's incorrectly - we should be able to set
a list. Also not converting names from DOS CP to UNIX CP correctly. This
code doesn't quite work yet but it's a work in progress to be fixed
tomorrow (don't want to lose it).
Jeremy.
(This used to be commit 22fca746576810c5408540031a9603625a66cd75)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/charcnv.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source3/lib/charcnv.c b/source3/lib/charcnv.c index b9b9d90db6..4fbad0f3d1 100644 --- a/source3/lib/charcnv.c +++ b/source3/lib/charcnv.c @@ -1269,6 +1269,21 @@ size_t pull_utf8_allocate(char **dest, const char *src) } /** + * Copy a string from a DOS src to a unix char * destination, allocating a buffer using talloc + * + * @param dest always set at least to NULL + * + * @returns The number of bytes occupied by the string in the destination + **/ + +size_t pull_ascii_talloc(TALLOC_CTX *ctx, char **dest, const char *src) +{ + size_t src_len = strlen(src)+1; + *dest = NULL; + return convert_string_talloc(ctx, CH_DOS, CH_UNIX, src, src_len, (void **)dest, True); +} + +/** Copy a string from a char* src to a unicode or ascii dos codepage destination choosing unicode or ascii based on the flags in the SMB buffer starting at base_ptr. |