issue with 1.6 and kdb5_util load, requesting help

Will Fiveash William.Fiveash at sun.com
Tue Mar 20 16:08:08 EDT 2007


On Tue, Mar 20, 2007 at 02:52:55PM -0500, Will Fiveash wrote:
> While doing some testing I noticed that the kdb5_util load command is
> broken when using the db2 KDB plugin and the KDB does not exist.  The
> problem appears to be that in the process of doing a load
> krb5_db2_db_rename() is called which in turn calls krb5_db2_db_init().
> In krb5_db2_db_init() there is this logic:
> 
>     if ((db_ctx->db_lf_file = open(filename, O_RDWR, 0666)) < 0) {
>         if ((db_ctx->db_lf_file = open(filename, O_RDONLY, 0666)) < 0) {
>             retval = errno;
>             goto err_out;
>         }
>     }
> 
> which is trying to open the principal.ok lock-file.  If this doesn't
> exist then this causes a fatal error.  Thoughts on how to address this
> are appreciated.

BTW, I notice that in an older version of krb5_db2_db_rename() instead
of calling krb5_db2_db_init() there is:

    db_ctx->db_lf_file = open(db_ctx->db_lf_name, O_RDWR|O_CREAT, 0600);
        if (db_ctx->db_lf_file < 0) {
            retval = errno;
            goto errout;
        }

    db_ctx->db_inited = 1;

So it creates the lock-file and sets db_inited.  Is it reasonable to
modify the 1.6 krb5_db2_db_init() interface to take a flag to indicate
the lock-file may need to be created?

-- 
Will Fiveash
Sun Microsystems Inc.
Austin, TX, USA (TZ=CST6CDT)



More information about the krbdev mailing list