The Samba-Bugzilla – Attachment 11481 Details for
Bug 11543
vfs_fruit: return value of ad_pack in vfs_fruit.c
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for 4.2 and 4.3 cherry-picked from master
fruit-4.2-and-4.3.patch (text/plain), 1.67 KB, created by
Ralph Böhme
on 2015-10-06 16:03:06 UTC
(
hide
)
Description:
Patch for 4.2 and 4.3 cherry-picked from master
Filename:
MIME Type:
Creator:
Ralph Böhme
Created:
2015-10-06 16:03:06 UTC
Size:
1.67 KB
patch
obsolete
>From bc973a9b24435602b46f09e8475b7ac19da263b6 Mon Sep 17 00:00:00 2001 >From: Ralph Boehme <slow@samba.org> >Date: Sun, 27 Sep 2015 12:11:31 +0200 >Subject: [PATCH] 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) >--- > source3/modules/vfs_fruit.c | 14 ++++++++------ > 1 file changed, 8 insertions(+), 6 deletions(-) > >diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c >index 21b49f9..ecce85d 100644 >--- a/source3/modules/vfs_fruit.c >+++ b/source3/modules/vfs_fruit.c >@@ -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) { >-- >2.1.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
jra
:
review+
uri
:
review+
Actions:
View
Attachments on
bug 11543
: 11481