mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
common: New functions gnupg_daemon_rootdir and gnupg_chdir.
* common/sysutils.c (gnupg_chdir): New. * common/homedir.c (gnupg_daemon_rootdir): New. * agent/gpg-agent.c (main): Use these functions instead chdir("/"). * dirmngr/dirmngr.c (main): Ditto. * scd/scdaemon.c (main): Ditto. -- Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
f2d2648a4d
commit
226f143ca0
7 changed files with 50 additions and 7 deletions
|
@ -796,6 +796,15 @@ gnupg_mkdir (const char *name, const char *modestr)
|
|||
}
|
||||
|
||||
|
||||
/* A simple wrapper around chdir. NAME is expected to be utf8
|
||||
* encoded. */
|
||||
int
|
||||
gnupg_chdir (const char *name)
|
||||
{
|
||||
return chdir (name);
|
||||
}
|
||||
|
||||
|
||||
/* A wrapper around chmod which takes a string for the mode argument.
|
||||
This makes it easier to handle the mode argument which is not
|
||||
defined on all systems. The format of the modestring is the same
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue