diff options
-rw-r--r-- | scripts/pacman-key.sh.in | 6 | ||||
-rw-r--r-- | src/pacman/conf.c | 12 |
2 files changed, 10 insertions, 8 deletions
diff --git a/scripts/pacman-key.sh.in b/scripts/pacman-key.sh.in index e0f48f5c..689dc564 100644 --- a/scripts/pacman-key.sh.in +++ b/scripts/pacman-key.sh.in @@ -450,9 +450,9 @@ fi # file, falling back on a hard default PACMAN_KEYRING_DIR=${PACMAN_KEYRING_DIR:-$(get_from "$CONFIG" "GPGDir" "@sysconfdir@/pacman.d/gnupg")} -GPG_PACMAN=(gpg --homedir ${PACMAN_KEYRING_DIR} --no-permission-warning) +GPG_PACMAN=(gpg --homedir "${PACMAN_KEYRING_DIR}" --no-permission-warning) if [[ -n ${KEYSERVER} ]]; then - GPG_PACMAN+=(--keyserver ${KEYSERVER}) + GPG_PACMAN+=(--keyserver "${KEYSERVER}") fi # check only a single operation has been given @@ -492,7 +492,7 @@ fi (( POPULATE )) && populate_keyring (( RECEIVE )) && "${GPG_PACMAN[@]}" --recv-keys "${KEYIDS[@]}" (( REFRESH )) && "${GPG_PACMAN[@]}" --refresh-keys "${KEYIDS[@]}" -(( VERIFY )) && "${GPG_PACMAN[@]}" --verify $SIGNATURE +(( VERIFY )) && "${GPG_PACMAN[@]}" --verify "$SIGNATURE" if (( UPDATEDB )); then msg "$(gettext "Updating trust database...")" diff --git a/src/pacman/conf.c b/src/pacman/conf.c index 6703243a..117aecd4 100644 --- a/src/pacman/conf.c +++ b/src/pacman/conf.c @@ -720,17 +720,19 @@ static int _parseconfig(const char *file, struct section_t *section, size_t line_len; linenum++; - strtrim(line); - line_len = strlen(line); /* ignore whole line and end of line comments */ - if(line_len == 0 || line[0] == '#') { - continue; - } if((ptr = strchr(line, '#'))) { *ptr = '\0'; } + strtrim(line); + line_len = strlen(line); + + if(line_len == 0) { + continue; + } + if(line[0] == '[' && line[line_len - 1] == ']') { char *name; /* only possibility here is a line == '[]' */ |