summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-01-15 17:22:48 +0000
committerGerald Carter <jerry@samba.org>2003-01-15 17:22:48 +0000
commit4242eda183393b0535ac8ef880b4f441c60137af (patch)
tree661f28140c58a598567a22932406885a19c5ce7b /source3/libsmb
parent6999ff1d484ea8f1957b3479b24ec3fea228fdd0 (diff)
downloadsamba-4242eda183393b0535ac8ef880b4f441c60137af.tar.gz
samba-4242eda183393b0535ac8ef880b4f441c60137af.tar.bz2
samba-4242eda183393b0535ac8ef880b4f441c60137af.zip
merging some rpcclient and net functionality from HEAD
(This used to be commit 7a4c87484237308cb3ad0d671687da7e0f6e733b)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/asn1.c2
-rw-r--r--source3/libsmb/clilist.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/source3/libsmb/asn1.c b/source3/libsmb/asn1.c
index b967927871..333d157905 100644
--- a/source3/libsmb/asn1.c
+++ b/source3/libsmb/asn1.c
@@ -407,7 +407,7 @@ BOOL asn1_check_enumerated(ASN1_DATA *data, int v)
return !data->has_error && (v == b);
}
-/* check a enumarted value is correct */
+/* write an enumarted value to the stream */
BOOL asn1_write_enumerated(ASN1_DATA *data, uint8 v)
{
if (!asn1_push_tag(data, ASN1_ENUMERATED)) return False;
diff --git a/source3/libsmb/clilist.c b/source3/libsmb/clilist.c
index 4a1737af49..bf10be887a 100644
--- a/source3/libsmb/clilist.c
+++ b/source3/libsmb/clilist.c
@@ -324,8 +324,10 @@ static int interpret_short_filename(struct cli_state *cli, char *p,file_info *fi
finfo->mtime = finfo->atime = finfo->ctime;
finfo->size = IVAL(p,26);
clistr_pull(cli, finfo->name, p+30, sizeof(finfo->name), 12, STR_ASCII);
- if (strcmp(finfo->name, "..") && strcmp(finfo->name, "."))
- fstrcpy(finfo->short_name,finfo->name);
+ if (strcmp(finfo->name, "..") && strcmp(finfo->name, ".")) {
+ strncpy(finfo->short_name,finfo->name, sizeof(finfo->short_name)-1);
+ finfo->short_name[sizeof(finfo->short_name)-1] = '\0';
+ }
return(DIR_STRUCT_SIZE);
}