Skip to content

Commit

Permalink
twisted u_name and m_name
Browse files Browse the repository at this point in the history
Fix Bug#523.

Additional Info:
The following line in ofork.c may also be wrong.

    /* Somone has used write_fork, we assume file was changed, register it to file change event api */
    if (ofork->of_flags & AFPFORK_MODIFIED) {
        struct dir *dir =  dirlookup(ofork->of_vol, ofork->of_did);
        bstring forkpath = bformat("%s/%s", bdata(dir->d_fullpath), of_name(ofork));
        fce_register(FCE_FILE_MODIFY, bdata(forkpath), NULL, fce_file);
        bdestroy(forkpath);
    }
  • Loading branch information
hat001 committed Aug 29, 2013
1 parent 253061c commit 5622ebe
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Changes in 3.0.6
================
* FIX: charset conversion failed when copying from Mac OS 9. Bug #523.

Changes in 3.0.5
================
* FIX: Fix a crash when using pam_winbind. Fixes bug #516.
Expand Down
4 changes: 2 additions & 2 deletions etc/afpd/fork.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ static int getforkparams(const AFPObj *obj, struct ofork *ofork, uint16_t bitmap
vol = ofork->of_vol;
dir = dirlookup(vol, ofork->of_did);

if (NULL == (path.m_name = utompath(vol, of_name(ofork), dir->d_did, utf8_encoding(obj)))) {
if (NULL == (path.u_name = mtoupath(vol, of_name(ofork), dir->d_did, utf8_encoding(obj)))) {
return( AFPERR_MISC );
}
path.u_name = of_name(ofork);
path.m_name = of_name(ofork);
path.id = 0;
st = &path.st;
if ( bitmap & ( (1<<FILPBIT_DFLEN) | (1<<FILPBIT_EXTDFLEN) |
Expand Down
2 changes: 1 addition & 1 deletion include/atalk/adouble.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ struct adouble {
int ad_reso_refcount;
off_t ad_rlen; /* ressource fork len with AFP 3.0 *
* the header parameter size is too small. */
char *ad_name; /* name (UTF8-MAC) */
char *ad_name; /* mac name (maccharset or UTF8-MAC) */
struct adouble_fops *ad_ops;
uint16_t ad_open_forks; /* open forks (by others) */
char ad_data[AD_DATASZ_MAX];
Expand Down

0 comments on commit 5622ebe

Please sign in to comment.