Example #1
0
errcode_t KRB5_CALLCONV
profile_is_writable(profile_t profile, int *writable)
{
    if (!profile || profile->magic != PROF_MAGIC_PROFILE)
        return PROF_MAGIC_PROFILE;
    
    if (!writable) 
        return EINVAL;
    
    if (profile->first_file)
        *writable = profile_file_is_writable(profile->first_file);
    
    return 0;
}
Example #2
0
errcode_t KRB5_CALLCONV
profile_is_writable(profile_t profile, int *writable)
{
    if (!profile || profile->magic != PROF_MAGIC_PROFILE)
        return PROF_MAGIC_PROFILE;

    if (!writable)
        return EINVAL;
    *writable = 0;

    if (profile->vt) {
        if (profile->vt->writable)
            return profile->vt->writable(profile->cbdata, writable);
        else
            return 0;
    }

    if (profile->first_file)
        *writable = profile_file_is_writable(profile->first_file);

    return 0;
}