Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 494492 Details for
Bug 597804
MITM on sync+emerge = root almost any gentoo system
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Sample /etc/portage/repo.postsync.d hook, for use with porthash
rpi3-check-porthash (text/plain), 1.08 KB, created by
sakaki
on 2017-09-14 11:53:31 UTC
(
hide
)
Description:
Sample /etc/portage/repo.postsync.d hook, for use with porthash
Filename:
MIME Type:
Creator:
sakaki
Created:
2017-09-14 11:53:31 UTC
Size:
1.08 KB
patch
obsolete
>#!/bin/bash ># Copyright (c) 2017 sakaki <sakaki@deciban.com> ># License: GPL 3.0+ ># NO WARRANTY ># ># Check the master hash for the gentoo repo, if rsync'd from ># the isshoni.org server. ># ># If the hashes do NOT match, kill the parent process to ensure that ># emerge --sync etc. does not proceed any further (simply returning ># a non-zero exit code is insufficient to do that, and we don't want ># e.g. genup building updates on the basis of an invalid repo). > >repository_name="${1}" ># The URI to which the repository was synced. >sync_uri="${2}" ># The path to the repository. >repository_path="${3}" > >ret=0 > >if [[ "${repository_name}" == "gentoo" && \ > "${sync_uri}" == "rsync://isshoni.org/gentoo-portage-pi64" ]]; then > echo "Checking master signature on gentoo repo..." > porthash --repo="${repository_path}" > ret=$? > if ((ret!=0)); then > echo "Killing parent process..." 1>&2 > # need to do this or e.g. genup will blithely continue > kill -SIGQUIT $(ps --pid $$ -oppid=) > fi >fi > ># Return explicit status. >exit "${ret}"
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 597804
:
494384
| 494492