From 6304cf042d110051340daaa2c78e8e51a3739930 Mon Sep 17 00:00:00 2001 From: franklahm Date: Mon, 18 Jan 2010 11:45:37 +0000 Subject: [PATCH 1/1] Enumeration didn't write CNID data to adouble file when creating --- etc/afpd/directory.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/etc/afpd/directory.c b/etc/afpd/directory.c index fe1b8f4d..0ffdf698 100644 --- a/etc/afpd/directory.c +++ b/etc/afpd/directory.c @@ -1,5 +1,5 @@ /* - * $Id: directory.c,v 1.127 2010-01-10 10:58:24 franklahm Exp $ + * $Id: directory.c,v 1.128 2010-01-18 11:45:37 franklahm Exp $ * * Copyright (c) 1990,1993 Regents of The University of Michigan. * All Rights Reserved. See COPYRIGHT. @@ -1688,6 +1688,17 @@ int getdirparams(const struct vol *vol, ad_init(&ad, vol->v_adouble, vol->v_ad_options); if ( !ad_metadata( upath, ADFLAGS_CREATE|ADFLAGS_DIR, &ad) ) { isad = 1; + if (ad.ad_md->adf_flags & O_CREAT) { + /* We just created it */ + ad_setname(&ad, s_path->m_name); + ad_setid( &ad, + s_path->st.st_dev, + s_path->st.st_ino, + dir->d_did, + dir->d_parent->d_did, + vol->v_stamp); + ad_flush( &ad); + } } } -- 2.39.2