Do not overwrite default download user when option is unset
Commit 7ccf316c
provided "root" (or the user name for UID 0) as a
default download user. However, when DownloadUser is unset in pacman.conf,
pacman was overwriting the default with null. Rectify this.
Fixes #248
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
b104b95423
commit
692f7a2cfe
2 changed files with 6 additions and 2 deletions
|
@ -85,7 +85,7 @@ alpm_handle_t SYMEXPORT *alpm_initialize(const char *root, const char *dbpath,
|
|||
/* set default sandboxuser */
|
||||
ASSERT((pw = getpwuid(0)) != NULL, myerr = errno; goto cleanup);
|
||||
STRDUP(myhandle->sandboxuser, pw->pw_name, goto nomem);
|
||||
|
||||
|
||||
#ifdef ENABLE_NLS
|
||||
bindtextdomain("libalpm", LOCALEDIR);
|
||||
#endif
|
||||
|
|
|
@ -938,7 +938,11 @@ static int setup_libalpm(void)
|
|||
alpm_option_set_architectures(handle, config->architectures);
|
||||
alpm_option_set_checkspace(handle, config->checkspace);
|
||||
alpm_option_set_usesyslog(handle, config->usesyslog);
|
||||
alpm_option_set_sandboxuser(handle, config->sandboxuser);
|
||||
|
||||
if(config->sandboxuser) {
|
||||
alpm_option_set_sandboxuser(handle, config->sandboxuser);
|
||||
}
|
||||
|
||||
alpm_option_set_disable_sandbox(handle, config->disable_sandbox);
|
||||
|
||||
alpm_option_set_ignorepkgs(handle, config->ignorepkg);
|
||||
|
|
Loading…
Add table
Reference in a new issue