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.