Page MenuHome GnuPG

g10/keydb.c:maybe_create_keyring_or_box doesn't check for EACCESS
Closed, ResolvedPublic

Description

In the aforementioned function, we have:

  if (!access (filename, F_OK))
    return 0;

0 means it is okay to access the specified file. However, it could be that
access returns EACCESS. In this case we should probably not return 0.

Event Timeline

Did you mean:
In this case we should also return 0 ?

I recently di this change:

  • return 0;

+ return !access (filename, R_OK)? 0 : gpg_error (GPG_ERR_EACCES);

(commit 5d13581f4737c18430f6572dd4ef486d1ad80dd1)

Does that solve your problem?

werner claimed this task.
werner removed a project: Restricted Project.