OpenAFS Master Repository branch, master, updated. openafs-devel-1_5_76-4096-g5c0a1d4

Gerrit Code Review gerrit@openafs.org
Sun, 12 Jan 2014 11:53:17 -0800 (PST)


The following commit has been merged in the master branch:
commit 5c0a1d4acce78a582187b5ab3d0d4d60b97d7557
Author: Andrew Deason <adeason@sinenomine.net>
Date:   Thu Dec 19 14:04:56 2013 -0600

    DARWIN: Convert crfree back into a macro
    
    Commit 1d8937b860509fcaabb041bc14faf7aa3023f3c9 turned crfree on
    DARWIN into an inline function to work around an error flagged by
    clang. A side effect of this is that the address passed to
    kauth_cred_unref will not be the actual address of the value given to
    crfree; we are instead giving kauth_cred_unref the address of our
    function argument in order to adhere to the semantics of a function
    call.
    
    kauth_cred_unref seems to just take a pointer to the cred pointer in
    order to set the value to effectively NULL afterwards, so this is not
    a huge deal. However, this does mean that our current implementation
    undoes any of the safeguards intended by making kauth_cred_unref work
    this way in the first place.
    
    So, revert 1d8937b860509fcaabb041bc14faf7aa3023f3c9 and put the crfree
    definition back to the way it was. Fix the caller in
    afs_StoreOnLastReference to not cause an error by just assigning the
    cred pointer to a temporary value. While it's not ideal that some
    callers may need to do this, this is the only place where this is
    necessary and it's more of an artifact of the weirdness of storing a
    cred pointer in linkData, which probably should be changed anyway.
    
    Change-Id: I50557901203d22a7b19028be551eb40f0c4cd751
    Reviewed-on: http://gerrit.openafs.org/10614
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

 src/afs/DARWIN/osi_machdep.h   |    2 +-
 src/afs/VNOPS/afs_vnop_write.c |    5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)

-- 
OpenAFS Master Repository