1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-20 22:50:26 +03:00

vfs_fruit: return value of ad_pack in vfs_fruit.c

ad_pack() in vfs_fruit.c returns false on failure and 0 on success -
i.e. return value is interpreted as success even when it fails.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=11543

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>

Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Tue Oct  6 16:14:42 CEST 2015 on sn-devel-104

(cherry picked from commit 5d7eaf959a0f11be878f698305fcb8908d7ba047)

Autobuild-User(v4-3-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-3-test): Tue Oct 13 12:29:33 CEST 2015 on sn-devel-104
This commit is contained in:
Ralph Boehme 2015-09-27 12:11:31 +02:00 committed by Karolin Seeger
parent dff1fd5e57
commit c84322da08

View File

@ -567,7 +567,7 @@ static bool ad_pack(struct adouble *ad)
}
RSSVAL(ad->ad_data, ADEDOFF_NENTRIES, nent);
return 0;
return true;
}
/**
@ -949,8 +949,9 @@ static ssize_t ad_header_read_rsrc(struct adouble *ad, const char *path)
/*
* Can't use ad_write() because we might not have a fsp
*/
rc = ad_pack(ad);
if (rc != 0) {
ok = ad_pack(ad);
if (!ok) {
rc = -1;
goto exit;
}
/* FIXME: direct sys_pwrite(), don't have an fsp */
@ -1211,10 +1212,11 @@ static int ad_write(struct adouble *ad, const char *path)
{
int rc = 0;
ssize_t len;
bool ok;
rc = ad_pack(ad);
if (rc != 0) {
goto exit;
ok = ad_pack(ad);
if (!ok) {
return -1;
}
switch (ad->ad_type) {