[Bug 849598] New: utility program ad fails under certain conditions, because cnid_for_paths_parent(...) (ad_utils.c) handles path concatenation wrongly
https://bugzilla.novell.com/show_bug.cgi?id=849598 https://bugzilla.novell.com/show_bug.cgi?id=849598#c0 Summary: utility program ad fails under certain conditions, because cnid_for_paths_parent(...) (ad_utils.c) handles path concatenation wrongly Classification: openSUSE Product: openSUSE 12.3 Version: Final Platform: x86-64 OS/Version: openSUSE 12.3 Status: NEW Severity: Minor Priority: P5 - None Component: Network AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: stefan.muenkner@mx.uni-saarland.de QAContact: qa-bugs@suse.de Found By: --- Blocker: --- Created an attachment (id=566686) --> (http://bugzilla.novell.com/attachment.cgi?id=566686) patch to fix ad_util.c User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:25.0) Gecko/20100101 Firefox/25.0 [Applies to all versions of netatalk up to 3.1.0] When using "ad mv" like so: ad mv /Volume/Path/File /Volume/Path/Target/File where the afp volume path is "/Volume/Path" and all files and dirs exist, an error is generated with the following error message: Nov 08 15:13:31.369557 [1717] {ad_util.c:360} (E:Default): lstat(rpath: Target/File, elem: CanvasScripts): /Volume/PathTarget/File: No such file or directory Couldn't resolve CNID for parent of /Volume/PathTarget/File Seemingly this is only an error message, otherwise the command works and resource forks seem to be correctly moved. Still it is annoying. The reason is, that cnid_for_paths_parent(...) (in ad_utils.c) splits the path into the volume (base) path [here /Volume/Path ] and the relative path to the target [Target/File]. The relative path is then split into path components and every component is then in a loop concatenated to a statpath (initially set to the volume path) to retrieve (and set?) the correct parent CNIDs. Within the loop the statpath gets a "/" appended _after_ the relative path component is appended to statpath. This fails since the initial value of statpath is e.g. "/Volume/Path" without a trailing "/". The attached patch moves the call to "EC_ZERO(bcatcstr(statpath, "/"));" to the start of the loop, fixing the error generation. Additionally, "EC_NULL(statpath = bfromcstr(vol->volinfo.v_path));" was moved after the "if (l->qty==1)....", because the loop is only entered for l->qty!=1 and only then statpath is used. I reported the same error over at netatalk.sf.net. Reproducible: Always Steps to Reproduce: 1. have a target directory for an "ad mv" which is a sub-directory of the volume path 2. use ad mv (like above) 3. error message is generated Expected Results: the program should silently work Applies to all versions of netatalk up to 3.1.0 and thus all versions of netatalk in openSuSE -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=849598 https://bugzilla.novell.com/show_bug.cgi?id=849598#c Xiyuan Liu <xyliu@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |xyliu@suse.com AssignedTo|bnc-team-screening@forge.pr |pgajdos@suse.com |ovo.novell.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=849598 https://bugzilla.novell.com/show_bug.cgi?id=849598#c1 Petr Gajdos <pgajdos@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - None |P3 - Medium Status|NEW |NEEDINFO InfoProvider| |stefan.muenkner@mx.uni-saar | |land.de --- Comment #1 from Petr Gajdos <pgajdos@suse.com> 2013-11-18 09:33:05 UTC --- Upstream bug http://sourceforge.net/p/netatalk/bugs/538/ -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=849598 https://bugzilla.novell.com/show_bug.cgi?id=849598#c2 --- Comment #2 from Petr Gajdos <pgajdos@suse.com> 2013-11-18 09:33:45 UTC --- Stefan, do you think it is important enough to do an update for released distributions? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=849598 https://bugzilla.novell.com/show_bug.cgi?id=849598#c3 Stefan Münkner <stefan.muenkner@mx.uni-saarland.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW InfoProvider|stefan.muenkner@mx.uni-saar | |land.de | --- Comment #3 from Stefan Münkner <stefan.muenkner@mx.uni-saarland.de> 2013-11-18 13:19:17 UTC --- I am not certain, it warrants an extra update. If possible, you could wait until any other more urgent update comes in and push it out then. The fact that this particular error was so far never reported says a lot about the usage of "ad mv". I actually used it to rename several hundred files on the server and thus, the error message was alarming at first and annoying later. BTW I just checked: cnid_for_paths_parent() is seemingly exclusively used in do_move() in ad_mv.c. As long as you do not use "ad mv" one, the error will not pop up. However, do_move() returns -1 before updating the cnid database, and while the AppleDouble resource fork looks exactly the same (via apple_dump), I have no idea what the consequences of the missing CNID update are . It looks like the CNID gets resolved afterwards, so it might be minor (but then why cnid_for_paths_parent() is needed in the first place??.....) So far, I got no reaction from the netatalk folks. If they fix it for the next release you might as well just wait until then. Cheers, Stefan -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=849598 https://bugzilla.novell.com/show_bug.cgi?id=849598#c4 Petr Gajdos <pgajdos@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 - Medium |P4 - Low Status|NEW |ASSIGNED --- Comment #4 from Petr Gajdos <pgajdos@suse.com> 2013-11-19 08:24:41 UTC --- (In reply to comment #3)
I am not certain, it warrants an extra update. If possible, you could wait until any other more urgent update comes in and push it out then. The fact that
Exactly that I have on mind ;). Decreasing priority to P4. I am going to prepare update in factory. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=849598 https://bugzilla.novell.com/show_bug.cgi?id=849598#c5 --- Comment #5 from Petr Gajdos <pgajdos@suse.com> 2013-11-20 12:21:39 UTC --- Submitted netatalk 3.1.0 package including your patch, let's see what upstream thinks. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=849598 https://bugzilla.novell.com/show_bug.cgi?id=849598#c6 --- Comment #6 from Petr Gajdos <pgajdos@suse.com> 2013-11-20 12:22:26 UTC --- (submitted into factory) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=849598 https://bugzilla.novell.com/show_bug.cgi?id=849598#c7 --- Comment #7 from Bernhard Wiedemann <bwiedemann@suse.com> 2013-11-20 14:00:12 CET --- This is an autogenerated message for OBS integration: This bug (849598) was mentioned in https://build.opensuse.org/request/show/207745 Factory / netatalk -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=849598 https://bugzilla.novell.com/show_bug.cgi?id=849598#c8 --- Comment #8 from Stefan Münkner <stefan.muenkner@mx.uni-saarland.de> 2013-11-20 17:27:44 UTC --- thanks, and "let's see what upstream thinks." Ooooh the tension..... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=849598 https://bugzilla.novell.com/show_bug.cgi?id=849598#c9 Petr Gajdos <pgajdos@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P4 - Low |P3 - Medium Status|ASSIGNED |NEEDINFO InfoProvider| |maintenance@opensuse.org --- Comment #9 from Petr Gajdos <pgajdos@suse.com> 2013-12-11 12:46:58 UTC --- Mr. Maintenance, could we do an update? see mr#210549 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=849598 https://bugzilla.novell.com/show_bug.cgi?id=849598#c10 Benjamin Brunner <bbrunner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |ASSIGNED InfoProvider|maintenance@opensuse.org | --- Comment #10 from Benjamin Brunner <bbrunner@suse.com> 2013-12-11 15:25:52 CET --- Thanks Petr. I'll start an update. For future requests, please keep in mind to add the name of the new patch to your changelog entry. ;) Thanks. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=849598 https://bugzilla.novell.com/show_bug.cgi?id=849598#c11 --- Comment #11 from Petr Gajdos <pgajdos@suse.com> 2013-12-12 07:47:51 UTC --- (In reply to comment #10)
add the name of the new patch to your changelog entry. ;) Thanks.
Ah, I always try, but I forgot time to time. Feel free to decline request next time ;). Thanks! -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=849598 https://bugzilla.novell.com/show_bug.cgi?id=849598#c12 Petr Gajdos <pgajdos@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED --- Comment #12 from Petr Gajdos <pgajdos@suse.com> 2013-12-12 12:53:54 UTC --- Closing as fixed. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=849598 https://bugzilla.novell.com/show_bug.cgi?id=849598#c13 --- Comment #13 from Swamp Workflow Management <swamp@suse.de> 2013-12-16 14:04:52 UTC --- openSUSE-RU-2013:1879-1: An update that has one recommended fix can now be installed. Category: recommended (low) Bug References: 849598 CVE References: Sources used: openSUSE 13.1 (src): netatalk-3.0.5-5.1 openSUSE 12.3 (src): netatalk-2.2.4-2.6.1 openSUSE 12.2 (src): netatalk-2.2.2-2.5.1 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com