PR#4171: koji-gc: Add ccache to koji-gc options
Merges #4171 https://pagure.io/koji/pull-request/4171 Fixes: #4116 https://pagure.io/koji/issue/4116 koji-gc: dedicated Kerberos credential cache to avoid conflicts with root user's credential cache
This commit is contained in:
commit
fa0c558912
1 changed files with 4 additions and 1 deletions
|
|
@ -97,6 +97,8 @@ def get_options():
|
|||
"recommended.")
|
||||
parser.add_option("--exit-on-lock", action="store_true",
|
||||
help="quit if --lock-file exists, don't wait")
|
||||
parser.add_option("--ccache", default="/var/tmp/koji-gc.ccache",
|
||||
help="Path to Kerberos credentials cache")
|
||||
# parse once to get the config file
|
||||
(options, args) = parser.parse_args()
|
||||
|
||||
|
|
@ -142,6 +144,7 @@ def get_options():
|
|||
['timeout', None, 'integer'],
|
||||
['lock_file', None, 'string'],
|
||||
['exit_on_lock', None, 'boolean'],
|
||||
['ccache', None, 'string'],
|
||||
]
|
||||
for name, alias, type in cfgmap:
|
||||
if alias is None:
|
||||
|
|
@ -399,7 +402,7 @@ def activate_session(session):
|
|||
session.login()
|
||||
elif koji.reqgssapi:
|
||||
session.gssapi_login(principal=options.principal, keytab=options.keytab,
|
||||
proxyuser=options.runas)
|
||||
proxyuser=options.runas, ccache=options.ccache)
|
||||
if not options.noauth and not session.logged_in:
|
||||
error("Error: unable to log in, no authentication methods available")
|
||||
ensure_connection(session)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue