From: Frank L. <fra...@gm...> - 2013-08-28 16:26:22
|
Hi HAT Am 27.08.2013 um 18:32 schrieb HAT <ha...@fa...>: > When copying the file which has non-ASCII filename from Mac OS 9 to Netatalk > 3.0.5, the following errors occur. > I corroborated this problem on Fedora 19, Ubuntu 13.04 and OpenIndiana 151a8. > >> Aug 15 10:57:17.591788 cnid_dbd[21904] {charcnv.c:1002} (E:Default): Conversion failed ( UTF8 to CH_UCS2 ) >> Aug 15 10:57:17.591916 cnid_dbd[21904] {pack.c:91} (E:CNID): idxname: conversion error > > When this file has Custom Icon, the following errors also occur. > I corroborated this problem on Fedora 19 and Ubuntu 13.04. > >> Aug 15 10:57:17.592172 cnid_dbd[21904] {dbif.c:896} (E:CNID): error deleting key/value from cnid2.db: DB_SECONDARY_BAD: Secondary index inconsistent with primary >> Aug 15 10:57:17.592245 cnid_dbd[21904] {dbd_delete.c:77} (E:CNID): dbd_delete: Unable to delete entry for CNID 1043 >> Aug 15 10:57:17.592308 cnid_dbd[21904] {dbd_update.c:63} (E:CNID): dbd_update: Unable to update CNID: 1043, dev/ino: 0xfd02/0x22c090f, DID: 1041: K&K ソフトパン粉.eps > > When the latter errors occur, if Finder is again opened , file is not > displayed at all. > It seems to be unable to get a resource fork. > > It is a problem that cnid_dbd receives legacy mac charset. > It must be vol charset. > Probably, a problem is in afpd, not cnid_dbd. > > The charset of a variable "ad_name" is ambiguous. > I would like to check the specification of ad_name. > Is ad_name always UTF8-MAC? > In the case of AFP 2, is ad_name legacy mac charset? $ git grep ad_name etc/afpd/fork.h:#define of_name(a) (a)->of_ad->ad_name etc/afpd/ofork.c: if ((ad->ad_name = strdup(path)) == NULL) { etc/afpd/ofork.c: free( of->of_ad->ad_name ); include/atalk/adouble.h: char *ad_name; /* name (UTF8-MAC) */ It's not used often. It's allocated in of_alloc() which is called from afp_openfork():fork.c. There path = Its origin is struct path s_path->m_name in a fork.c:afp_openfork(). s_path is coming from cname() and iirc is in client encoding, so for OS 9 clients it's not UTF8. -r |