| 1 |
# SOME DESCRIPTIVE TITLE |
| 2 |
# Copyright (C) YEAR Free Software Foundation, Inc. |
| 3 |
# This file is distributed under the same license as the PACKAGE package. |
| 4 |
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
| 5 |
# |
| 6 |
#, fuzzy |
| 7 |
msgid "" |
| 8 |
msgstr "" |
| 9 |
"Project-Id-Version: PACKAGE VERSION\n" |
| 10 |
"POT-Creation-Date: 2026-06-05 06:29+0200\n" |
| 11 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
| 12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
| 13 |
"Language-Team: LANGUAGE <[email protected]>\n" |
| 14 |
"Language: \n" |
| 15 |
"MIME-Version: 1.0\n" |
| 16 |
"Content-Type: text/plain; charset=UTF-8\n" |
| 17 |
"Content-Transfer-Encoding: 8bit\n" |
| 18 |
|
| 19 |
#. type: TH |
| 20 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 21 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 22 |
#, no-wrap |
| 23 |
msgid "keyctl" |
| 24 |
msgstr "" |
| 25 |
|
| 26 |
#. type: TH |
| 27 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 28 |
#: opensuse-tumbleweed |
| 29 |
#, no-wrap |
| 30 |
msgid "2026-02-08" |
| 31 |
msgstr "" |
| 32 |
|
| 33 |
#. type: TH |
| 34 |
#: archlinux debian-unstable |
| 35 |
#, no-wrap |
| 36 |
msgid "Linux man-pages 6.18" |
| 37 |
msgstr "" |
| 38 |
|
| 39 |
#. type: SH |
| 40 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 41 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 42 |
#, no-wrap |
| 43 |
msgid "NAME" |
| 44 |
msgstr "" |
| 45 |
|
| 46 |
#. type: Plain text |
| 47 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 48 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 49 |
msgid "keyctl - manipulate the kernel's key management facility" |
| 50 |
msgstr "" |
| 51 |
|
| 52 |
#. type: SH |
| 53 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 54 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 55 |
#, no-wrap |
| 56 |
msgid "LIBRARY" |
| 57 |
msgstr "" |
| 58 |
|
| 59 |
#. type: Plain text |
| 60 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 61 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 62 |
msgid "Standard C library (I<libc>,\\ I<-lc>)" |
| 63 |
msgstr "" |
| 64 |
|
| 65 |
#. type: SH |
| 66 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 67 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 68 |
#, no-wrap |
| 69 |
msgid "SYNOPSIS" |
| 70 |
msgstr "" |
| 71 |
|
| 72 |
#. type: Plain text |
| 73 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 74 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 75 |
#, no-wrap |
| 76 |
msgid "" |
| 77 |
"B<#include E<lt>linux/keyctl.hE<gt>> /* Definition of B<KEY*> constants */\n" |
| 78 |
"B<#include E<lt>sys/syscall.hE<gt>> /* Definition of B<SYS_*> constants */\n" |
| 79 |
"B<#include E<lt>unistd.hE<gt>>\n" |
| 80 |
msgstr "" |
| 81 |
|
| 82 |
#. type: Plain text |
| 83 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 84 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 85 |
#, no-wrap |
| 86 |
msgid "B<long syscall(SYS_keyctl, int >I<op>B<, ...);>\n" |
| 87 |
msgstr "" |
| 88 |
|
| 89 |
#. type: SH |
| 90 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 91 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 92 |
#, no-wrap |
| 93 |
msgid "DESCRIPTION" |
| 94 |
msgstr "" |
| 95 |
|
| 96 |
#. type: Plain text |
| 97 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 98 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 99 |
msgid "B<keyctl>() allows user-space programs to perform key manipulation." |
| 100 |
msgstr "" |
| 101 |
|
| 102 |
#. type: Plain text |
| 103 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 104 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 105 |
msgid "" |
| 106 |
"The operation performed by B<keyctl>() is determined by the value of the " |
| 107 |
"I<op> argument. Each of these operations is wrapped by the I<libkeyutils> " |
| 108 |
"library (provided by the I<keyutils> package) into individual functions (see " |
| 109 |
"B<keyctl>(3)) to permit the compiler to check types." |
| 110 |
msgstr "" |
| 111 |
|
| 112 |
#. type: Plain text |
| 113 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 114 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 115 |
msgid "The permitted values for I<op> are:" |
| 116 |
msgstr "" |
| 117 |
|
| 118 |
#. type: TP |
| 119 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 120 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 121 |
#, no-wrap |
| 122 |
msgid "B<KEYCTL_GET_KEYRING_ID>(2const)" |
| 123 |
msgstr "" |
| 124 |
|
| 125 |
#. type: TQ |
| 126 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 127 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 128 |
#, no-wrap |
| 129 |
msgid "B<KEYCTL_JOIN_SESSION_KEYRING>(2const)" |
| 130 |
msgstr "" |
| 131 |
|
| 132 |
#. type: TQ |
| 133 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 134 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 135 |
#, no-wrap |
| 136 |
msgid "B<KEYCTL_UPDATE>(2const)" |
| 137 |
msgstr "" |
| 138 |
|
| 139 |
#. type: TQ |
| 140 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 141 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 142 |
#, no-wrap |
| 143 |
msgid "B<KEYCTL_REVOKE>(2const)" |
| 144 |
msgstr "" |
| 145 |
|
| 146 |
#. type: TQ |
| 147 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 148 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 149 |
#, no-wrap |
| 150 |
msgid "B<KEYCTL_CHOWN>(2const)" |
| 151 |
msgstr "" |
| 152 |
|
| 153 |
#. type: TQ |
| 154 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 155 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 156 |
#, no-wrap |
| 157 |
msgid "B<KEYCTL_SETPERM>(2const)" |
| 158 |
msgstr "" |
| 159 |
|
| 160 |
#. type: TQ |
| 161 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 162 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 163 |
#, no-wrap |
| 164 |
msgid "B<KEYCTL_DESCRIBE>(2const)" |
| 165 |
msgstr "" |
| 166 |
|
| 167 |
#. type: TQ |
| 168 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 169 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 170 |
#, no-wrap |
| 171 |
msgid "B<KEYCTL_CLEAR>(2const)" |
| 172 |
msgstr "" |
| 173 |
|
| 174 |
#. type: TQ |
| 175 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 176 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 177 |
#, no-wrap |
| 178 |
msgid "B<KEYCTL_LINK>(2const)" |
| 179 |
msgstr "" |
| 180 |
|
| 181 |
#. type: TQ |
| 182 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 183 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 184 |
#, no-wrap |
| 185 |
msgid "B<KEYCTL_UNLINK>(2const)" |
| 186 |
msgstr "" |
| 187 |
|
| 188 |
#. type: TQ |
| 189 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 190 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 191 |
#, no-wrap |
| 192 |
msgid "B<KEYCTL_SEARCH>(2const)" |
| 193 |
msgstr "" |
| 194 |
|
| 195 |
#. type: TQ |
| 196 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 197 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 198 |
#, no-wrap |
| 199 |
msgid "B<KEYCTL_READ>(2const)" |
| 200 |
msgstr "" |
| 201 |
|
| 202 |
#. type: TQ |
| 203 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 204 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 205 |
#, no-wrap |
| 206 |
msgid "B<KEYCTL_INSTANTIATE>(2const)" |
| 207 |
msgstr "" |
| 208 |
|
| 209 |
#. type: TQ |
| 210 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 211 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 212 |
#, no-wrap |
| 213 |
msgid "B<KEYCTL_INSTANTIATE_IOV>(2const)" |
| 214 |
msgstr "" |
| 215 |
|
| 216 |
#. type: TQ |
| 217 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 218 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 219 |
#, no-wrap |
| 220 |
msgid "B<KEYCTL_NEGATE>(2const)" |
| 221 |
msgstr "" |
| 222 |
|
| 223 |
#. type: TQ |
| 224 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 225 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 226 |
#, no-wrap |
| 227 |
msgid "B<KEYCTL_REJECT>(2const)" |
| 228 |
msgstr "" |
| 229 |
|
| 230 |
#. type: TQ |
| 231 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 232 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 233 |
#, no-wrap |
| 234 |
msgid "B<KEYCTL_SET_REQKEY_KEYRING>(2const)" |
| 235 |
msgstr "" |
| 236 |
|
| 237 |
#. type: TQ |
| 238 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 239 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 240 |
#, no-wrap |
| 241 |
msgid "B<KEYCTL_SET_TIMEOUT>(2const)" |
| 242 |
msgstr "" |
| 243 |
|
| 244 |
#. type: TQ |
| 245 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 246 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 247 |
#, no-wrap |
| 248 |
msgid "B<KEYCTL_ASSUME_AUTHORITY>(2const)" |
| 249 |
msgstr "" |
| 250 |
|
| 251 |
#. type: TQ |
| 252 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 253 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 254 |
#, no-wrap |
| 255 |
msgid "B<KEYCTL_GET_SECURITY>(2const)" |
| 256 |
msgstr "" |
| 257 |
|
| 258 |
#. type: TQ |
| 259 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 260 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 261 |
#, no-wrap |
| 262 |
msgid "B<KEYCTL_SESSION_TO_PARENT>(2const)" |
| 263 |
msgstr "" |
| 264 |
|
| 265 |
#. type: TQ |
| 266 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 267 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 268 |
#, no-wrap |
| 269 |
msgid "B<KEYCTL_INVALIDATE>(2const)" |
| 270 |
msgstr "" |
| 271 |
|
| 272 |
#. type: TQ |
| 273 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 274 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 275 |
#, no-wrap |
| 276 |
msgid "B<KEYCTL_GET_PERSISTENT>(2const)" |
| 277 |
msgstr "" |
| 278 |
|
| 279 |
#. type: TQ |
| 280 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 281 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 282 |
#, no-wrap |
| 283 |
msgid "B<KEYCTL_DH_COMPUTE>(2const)" |
| 284 |
msgstr "" |
| 285 |
|
| 286 |
#. type: TQ |
| 287 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 288 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 289 |
#, no-wrap |
| 290 |
msgid "B<KEYCTL_RESTRICT_KEYRING>(2const)" |
| 291 |
msgstr "" |
| 292 |
|
| 293 |
#. type: SH |
| 294 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 295 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 296 |
#, no-wrap |
| 297 |
msgid "RETURN VALUE" |
| 298 |
msgstr "" |
| 299 |
|
| 300 |
#. type: Plain text |
| 301 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 302 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 303 |
msgid "For a successful call, the return value depends on the operation." |
| 304 |
msgstr "" |
| 305 |
|
| 306 |
#. type: Plain text |
| 307 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 308 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 309 |
msgid "On error, -1 is returned, and I<errno> is set to indicate the error." |
| 310 |
msgstr "" |
| 311 |
|
| 312 |
#. type: SH |
| 313 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 314 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 315 |
#, no-wrap |
| 316 |
msgid "ERRORS" |
| 317 |
msgstr "" |
| 318 |
|
| 319 |
#. type: TP |
| 320 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 321 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 322 |
#, no-wrap |
| 323 |
msgid "B<EACCES>" |
| 324 |
msgstr "" |
| 325 |
|
| 326 |
#. type: Plain text |
| 327 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 328 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 329 |
msgid "The requested operation wasn't permitted." |
| 330 |
msgstr "" |
| 331 |
|
| 332 |
#. type: TP |
| 333 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 334 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 335 |
#, no-wrap |
| 336 |
msgid "B<EDQUOT>" |
| 337 |
msgstr "" |
| 338 |
|
| 339 |
#. type: Plain text |
| 340 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 341 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 342 |
msgid "" |
| 343 |
"The key quota for the caller's user would be exceeded by creating a key or " |
| 344 |
"linking it to the keyring." |
| 345 |
msgstr "" |
| 346 |
|
| 347 |
#. type: TP |
| 348 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 349 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 350 |
#, no-wrap |
| 351 |
msgid "B<EINVAL>" |
| 352 |
msgstr "" |
| 353 |
|
| 354 |
#. type: Plain text |
| 355 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 356 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 357 |
msgid "" |
| 358 |
"size of the string (including the terminating null byte) specified in " |
| 359 |
"I<arg3> (the key type) or I<arg4> (the key description) exceeded the limit " |
| 360 |
"(32 bytes and 4096 bytes respectively)." |
| 361 |
msgstr "" |
| 362 |
|
| 363 |
#. type: TP |
| 364 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 365 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 366 |
#, no-wrap |
| 367 |
msgid "B<EKEYEXPIRED>" |
| 368 |
msgstr "" |
| 369 |
|
| 370 |
#. type: Plain text |
| 371 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 372 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 373 |
msgid "An expired key was found or specified." |
| 374 |
msgstr "" |
| 375 |
|
| 376 |
#. type: TP |
| 377 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 378 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 379 |
#, no-wrap |
| 380 |
msgid "B<EKEYREJECTED>" |
| 381 |
msgstr "" |
| 382 |
|
| 383 |
#. type: Plain text |
| 384 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 385 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 386 |
msgid "A rejected key was found or specified." |
| 387 |
msgstr "" |
| 388 |
|
| 389 |
#. type: TP |
| 390 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 391 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 392 |
#, no-wrap |
| 393 |
msgid "B<EKEYREVOKED>" |
| 394 |
msgstr "" |
| 395 |
|
| 396 |
#. type: Plain text |
| 397 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 398 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 399 |
msgid "A revoked key was found or specified." |
| 400 |
msgstr "" |
| 401 |
|
| 402 |
#. type: TP |
| 403 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 404 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 405 |
#, no-wrap |
| 406 |
msgid "B<ENOKEY>" |
| 407 |
msgstr "" |
| 408 |
|
| 409 |
#. type: Plain text |
| 410 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 411 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 412 |
msgid "No matching key was found or an invalid key was specified." |
| 413 |
msgstr "" |
| 414 |
|
| 415 |
#. type: TP |
| 416 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 417 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 418 |
#, no-wrap |
| 419 |
msgid "B<ENOMEM>" |
| 420 |
msgstr "" |
| 421 |
|
| 422 |
#. type: Plain text |
| 423 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 424 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 425 |
msgid "" |
| 426 |
"One of kernel memory allocation routines failed during the execution of the " |
| 427 |
"syscall." |
| 428 |
msgstr "" |
| 429 |
|
| 430 |
#. type: TP |
| 431 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 432 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 433 |
#, no-wrap |
| 434 |
msgid "B<ENOTDIR>" |
| 435 |
msgstr "" |
| 436 |
|
| 437 |
#. type: Plain text |
| 438 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 439 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 440 |
msgid "" |
| 441 |
"A key of keyring type was expected but the ID of a key with a different type " |
| 442 |
"was provided." |
| 443 |
msgstr "" |
| 444 |
|
| 445 |
#. type: SH |
| 446 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 447 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 448 |
#, no-wrap |
| 449 |
msgid "VERSIONS" |
| 450 |
msgstr "" |
| 451 |
|
| 452 |
#. type: Plain text |
| 453 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 454 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 455 |
msgid "" |
| 456 |
"A wrapper is provided in the I<libkeyutils> library. (The accompanying " |
| 457 |
"package provides the I<E<lt>keyutils.hE<gt>> header file.) However, rather " |
| 458 |
"than using this system call directly, you probably want to use the various " |
| 459 |
"library functions mentioned in the descriptions of individual operations " |
| 460 |
"above." |
| 461 |
msgstr "" |
| 462 |
|
| 463 |
#. type: SH |
| 464 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 465 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 466 |
#, no-wrap |
| 467 |
msgid "STANDARDS" |
| 468 |
msgstr "" |
| 469 |
|
| 470 |
#. type: Plain text |
| 471 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 472 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 473 |
msgid "Linux." |
| 474 |
msgstr "" |
| 475 |
|
| 476 |
#. type: SH |
| 477 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 478 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 479 |
#, no-wrap |
| 480 |
msgid "HISTORY" |
| 481 |
msgstr "" |
| 482 |
|
| 483 |
#. type: Plain text |
| 484 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 485 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 486 |
msgid "Linux 2.6.10." |
| 487 |
msgstr "" |
| 488 |
|
| 489 |
#. type: SH |
| 490 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 491 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 492 |
#, no-wrap |
| 493 |
msgid "EXAMPLES" |
| 494 |
msgstr "" |
| 495 |
|
| 496 |
#. type: Plain text |
| 497 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 498 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 499 |
msgid "" |
| 500 |
"The program below provide subset of the functionality of the B<request-" |
| 501 |
"key>(8) program provided by the I<keyutils> package. For informational " |
| 502 |
"purposes, the program records various information in a log file." |
| 503 |
msgstr "" |
| 504 |
|
| 505 |
#. type: Plain text |
| 506 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 507 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 508 |
msgid "" |
| 509 |
"As described in B<request_key>(2), the B<request-key>(8) program is invoked " |
| 510 |
"with command-line arguments that describe a key that is to be instantiated. " |
| 511 |
"The example program fetches and logs these arguments. The program assumes " |
| 512 |
"authority to instantiate the requested key, and then instantiates that key." |
| 513 |
msgstr "" |
| 514 |
|
| 515 |
#. type: Plain text |
| 516 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 517 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 518 |
msgid "" |
| 519 |
"The following shell session demonstrates the use of this program. In the " |
| 520 |
"session, we compile the program and then use it to temporarily replace the " |
| 521 |
"standard B<request-key>(8) program. (Note that temporarily disabling the " |
| 522 |
"standard B<request-key>(8) program may not be safe on some systems.) While " |
| 523 |
"our example program is installed, we use the example program shown in " |
| 524 |
"B<request_key>(2) to request a key." |
| 525 |
msgstr "" |
| 526 |
|
| 527 |
#. type: Plain text |
| 528 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 529 |
#: opensuse-tumbleweed |
| 530 |
#, no-wrap |
| 531 |
msgid "" |
| 532 |
"$B< cc -o key_instantiate key_instantiate.c -lkeyutils>;\n" |
| 533 |
"$B< sudo mv /sbin/request-key /sbin/request-key.backup>;\n" |
| 534 |
"$B< sudo cp key_instantiate /sbin/request-key>;\n" |
| 535 |
"$B< ./t_request_key user mykey somepayloaddata>;\n" |
| 536 |
"Key ID is 20d035bf\n" |
| 537 |
"$B< sudo mv /sbin/request-key.backup /sbin/request-key>;\n" |
| 538 |
msgstr "" |
| 539 |
|
| 540 |
#. type: Plain text |
| 541 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 542 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 543 |
msgid "" |
| 544 |
"Looking at the log file created by this program, we can see the command-line " |
| 545 |
"arguments supplied to our example program:" |
| 546 |
msgstr "" |
| 547 |
|
| 548 |
#. type: Plain text |
| 549 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 550 |
#: opensuse-tumbleweed |
| 551 |
#, no-wrap |
| 552 |
msgid "" |
| 553 |
"$B< cat /tmp/key_instantiate.log>;\n" |
| 554 |
"Time: Mon Nov 7 13:06:47 2016\n" |
| 555 |
"\\&\n" |
| 556 |
"Command line arguments:\n" |
| 557 |
" argv[0]: /sbin/request-key\n" |
| 558 |
" operation: create\n" |
| 559 |
" key_to_instantiate: 20d035bf\n" |
| 560 |
" UID: 1000\n" |
| 561 |
" GID: 1000\n" |
| 562 |
" thread_keyring: 0\n" |
| 563 |
" process_keyring: 0\n" |
| 564 |
" session_keyring: 256e6a6\n" |
| 565 |
"\\&\n" |
| 566 |
"Key description: user;1000;1000;3f010000;mykey\n" |
| 567 |
"Auth key payload: somepayloaddata\n" |
| 568 |
"Destination keyring: 256e6a6\n" |
| 569 |
"Auth key description: .request_key_auth;1000;1000;0b010000;20d035bf\n" |
| 570 |
msgstr "" |
| 571 |
|
| 572 |
#. type: Plain text |
| 573 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 574 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 575 |
msgid "" |
| 576 |
"The last few lines of the above output show that the example program was " |
| 577 |
"able to fetch:" |
| 578 |
msgstr "" |
| 579 |
|
| 580 |
#. type: IP |
| 581 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 582 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 583 |
#, no-wrap |
| 584 |
msgid "\\[bu]" |
| 585 |
msgstr "" |
| 586 |
|
| 587 |
#. type: Plain text |
| 588 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 589 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 590 |
msgid "" |
| 591 |
"the description of the key to be instantiated, which included the name of " |
| 592 |
"the key (I<mykey>);" |
| 593 |
msgstr "" |
| 594 |
|
| 595 |
#. type: Plain text |
| 596 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 597 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 598 |
msgid "" |
| 599 |
"the payload of the authorization key, which consisted of the data " |
| 600 |
"(I<somepayloaddata>) passed to B<request_key>(2);" |
| 601 |
msgstr "" |
| 602 |
|
| 603 |
#. type: Plain text |
| 604 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 605 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 606 |
msgid "" |
| 607 |
"the destination keyring that was specified in the call to B<request_key>(2); " |
| 608 |
"and" |
| 609 |
msgstr "" |
| 610 |
|
| 611 |
#. type: Plain text |
| 612 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 613 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 614 |
msgid "" |
| 615 |
"the description of the authorization key, where we can see that the name of " |
| 616 |
"the authorization key matches the ID of the key that is to be instantiated " |
| 617 |
"(I<20d035bf>)." |
| 618 |
msgstr "" |
| 619 |
|
| 620 |
#. type: Plain text |
| 621 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 622 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 623 |
msgid "" |
| 624 |
"The example program in B<request_key>(2) specified the destination keyring " |
| 625 |
"as B<KEY_SPEC_SESSION_KEYRING>. By examining the contents of I</proc/keys>, " |
| 626 |
"we can see that this was translated to the ID of the destination keyring " |
| 627 |
"(I<0256e6a6>) shown in the log output above; we can also see the newly " |
| 628 |
"created key with the name I<mykey> and ID I<20d035bf>." |
| 629 |
msgstr "" |
| 630 |
|
| 631 |
#. type: Plain text |
| 632 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 633 |
#: opensuse-tumbleweed |
| 634 |
#, no-wrap |
| 635 |
msgid "" |
| 636 |
"$B< cat /proc/keys | egrep \\[aq]mykey|256e6a6\\[aq]>;\n" |
| 637 |
"0256e6a6 I--Q--- 194 perm 3f030000 1000 1000 keyring _ses: 3\n" |
| 638 |
"20d035bf I--Q--- 1 perm 3f010000 1000 1000 user mykey: 16\n" |
| 639 |
msgstr "" |
| 640 |
|
| 641 |
#. type: SS |
| 642 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 643 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 644 |
#, no-wrap |
| 645 |
msgid "Program source" |
| 646 |
msgstr "" |
| 647 |
|
| 648 |
#. type: Plain text |
| 649 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 650 |
#: opensuse-tumbleweed |
| 651 |
#, no-wrap |
| 652 |
msgid "" |
| 653 |
"/* key_instantiate.c */\n" |
| 654 |
"\\&\n" |
| 655 |
"#include E<lt>errno.hE<gt>\n" |
| 656 |
"#include E<lt>keyutils.hE<gt>\n" |
| 657 |
"#include E<lt>stdint.hE<gt>\n" |
| 658 |
"#include E<lt>stdio.hE<gt>\n" |
| 659 |
"#include E<lt>stdlib.hE<gt>\n" |
| 660 |
"#include E<lt>string.hE<gt>\n" |
| 661 |
"#include E<lt>sys/types.hE<gt>\n" |
| 662 |
"#include E<lt>time.hE<gt>\n" |
| 663 |
"\\&\n" |
| 664 |
"#ifndef KEY_SPEC_REQUESTOR_KEYRING\n" |
| 665 |
"#define KEY_SPEC_REQUESTOR_KEYRING (-8)\n" |
| 666 |
"#endif\n" |
| 667 |
"\\&\n" |
| 668 |
"int\n" |
| 669 |
"main(int argc, char *argv[])\n" |
| 670 |
"{\n" |
| 671 |
" int akp_size; /* Size of auth_key_payload */\n" |
| 672 |
" int auth_key;\n" |
| 673 |
" char dbuf[256];\n" |
| 674 |
" char auth_key_payload[256];\n" |
| 675 |
" char *operation;\n" |
| 676 |
" FILE *fp;\n" |
| 677 |
" gid_t gid;\n" |
| 678 |
" uid_t uid;\n" |
| 679 |
" time_t t;\n" |
| 680 |
" key_serial_t key_to_instantiate, dest_keyring;\n" |
| 681 |
" key_serial_t thread_keyring, process_keyring, session_keyring;\n" |
| 682 |
"\\&\n" |
| 683 |
" if (argc != 8) {\n" |
| 684 |
" fprintf(stderr, \"Usage: %s op key uid gid thread_keyring \"\n" |
| 685 |
" \"process_keyring session_keyring\\[rs]n\", argv[0]);\n" |
| 686 |
" exit(EXIT_FAILURE);\n" |
| 687 |
" }\n" |
| 688 |
"\\&\n" |
| 689 |
" fp = fopen(\"/tmp/key_instantiate.log\", \"w\");\n" |
| 690 |
" if (fp == NULL)\n" |
| 691 |
" exit(EXIT_FAILURE);\n" |
| 692 |
"\\&\n" |
| 693 |
" setbuf(fp, NULL);\n" |
| 694 |
"\\&\n" |
| 695 |
" t = time(NULL);\n" |
| 696 |
" fprintf(fp, \"Time: %s\\[rs]n\", ctime(&t));\n" |
| 697 |
"\\&\n" |
| 698 |
" /*\n" |
| 699 |
" * The kernel passes a fixed set of arguments to the program\n" |
| 700 |
" * that it execs; fetch them.\n" |
| 701 |
" */\n" |
| 702 |
" operation = argv[1];\n" |
| 703 |
" key_to_instantiate = atoi(argv[2]);\n" |
| 704 |
" uid = atoi(argv[3]);\n" |
| 705 |
" gid = atoi(argv[4]);\n" |
| 706 |
" thread_keyring = atoi(argv[5]);\n" |
| 707 |
" process_keyring = atoi(argv[6]);\n" |
| 708 |
" session_keyring = atoi(argv[7]);\n" |
| 709 |
"\\&\n" |
| 710 |
" fprintf(fp, \"Command line arguments:\\[rs]n\");\n" |
| 711 |
" fprintf(fp, \" argv[0]: %s\\[rs]n\", argv[0]);\n" |
| 712 |
" fprintf(fp, \" operation: %s\\[rs]n\", operation);\n" |
| 713 |
" fprintf(fp, \" key_to_instantiate: %jx\\[rs]n\",\n" |
| 714 |
" (uintmax_t) key_to_instantiate);\n" |
| 715 |
" fprintf(fp, \" UID: %jd\\[rs]n\", (intmax_t) uid);\n" |
| 716 |
" fprintf(fp, \" GID: %jd\\[rs]n\", (intmax_t) gid);\n" |
| 717 |
" fprintf(fp, \" thread_keyring: %jx\\[rs]n\",\n" |
| 718 |
" (uintmax_t) thread_keyring);\n" |
| 719 |
" fprintf(fp, \" process_keyring: %jx\\[rs]n\",\n" |
| 720 |
" (uintmax_t) process_keyring);\n" |
| 721 |
" fprintf(fp, \" session_keyring: %jx\\[rs]n\",\n" |
| 722 |
" (uintmax_t) session_keyring);\n" |
| 723 |
" fprintf(fp, \"\\[rs]n\");\n" |
| 724 |
"\\&\n" |
| 725 |
" /*\n" |
| 726 |
" * Assume the authority to instantiate the key named in argv[2].\n" |
| 727 |
" */\n" |
| 728 |
" if (keyctl(KEYCTL_ASSUME_AUTHORITY, key_to_instantiate) == -1) {\n" |
| 729 |
" fprintf(fp, \"KEYCTL_ASSUME_AUTHORITY failed: %s\\[rs]n\",\n" |
| 730 |
" strerror(errno));\n" |
| 731 |
" exit(EXIT_FAILURE);\n" |
| 732 |
" }\n" |
| 733 |
"\\&\n" |
| 734 |
" /*\n" |
| 735 |
" * Fetch the description of the key that is to be instantiated.\n" |
| 736 |
" */\n" |
| 737 |
" if (keyctl(KEYCTL_DESCRIBE, key_to_instantiate,\n" |
| 738 |
" dbuf, sizeof(dbuf)) == -1) {\n" |
| 739 |
" fprintf(fp, \"KEYCTL_DESCRIBE failed: %s\\[rs]n\", strerror(errno));\n" |
| 740 |
" exit(EXIT_FAILURE);\n" |
| 741 |
" }\n" |
| 742 |
"\\&\n" |
| 743 |
" fprintf(fp, \"Key description: %s\\[rs]n\", dbuf);\n" |
| 744 |
"\\&\n" |
| 745 |
" /*\n" |
| 746 |
" * Fetch the payload of the authorization key, which is\n" |
| 747 |
" * actually the callout data given to request_key().\n" |
| 748 |
" */\n" |
| 749 |
" akp_size = keyctl(KEYCTL_READ, KEY_SPEC_REQKEY_AUTH_KEY,\n" |
| 750 |
" auth_key_payload, sizeof(auth_key_payload));\n" |
| 751 |
" if (akp_size == -1) {\n" |
| 752 |
" fprintf(fp, \"KEYCTL_READ failed: %s\\[rs]n\", strerror(errno));\n" |
| 753 |
" exit(EXIT_FAILURE);\n" |
| 754 |
" }\n" |
| 755 |
"\\&\n" |
| 756 |
" auth_key_payload[akp_size] = \\[aq]\\[rs]0\\[aq];\n" |
| 757 |
" fprintf(fp, \"Auth key payload: %s\\[rs]n\", auth_key_payload);\n" |
| 758 |
"\\&\n" |
| 759 |
" /*\n" |
| 760 |
" * For interest, get the ID of the authorization key and\n" |
| 761 |
" * display it.\n" |
| 762 |
" */\n" |
| 763 |
" auth_key = keyctl(KEYCTL_GET_KEYRING_ID,\n" |
| 764 |
" KEY_SPEC_REQKEY_AUTH_KEY);\n" |
| 765 |
" if (auth_key == -1) {\n" |
| 766 |
" fprintf(fp, \"KEYCTL_GET_KEYRING_ID failed: %s\\[rs]n\",\n" |
| 767 |
" strerror(errno));\n" |
| 768 |
" exit(EXIT_FAILURE);\n" |
| 769 |
" }\n" |
| 770 |
"\\&\n" |
| 771 |
" fprintf(fp, \"Auth key ID: %jx\\[rs]n\", (uintmax_t) auth_key);\n" |
| 772 |
"\\&\n" |
| 773 |
" /*\n" |
| 774 |
" * Fetch key ID for the request_key(2) destination keyring.\n" |
| 775 |
" */\n" |
| 776 |
" dest_keyring = keyctl(KEYCTL_GET_KEYRING_ID,\n" |
| 777 |
" KEY_SPEC_REQUESTOR_KEYRING);\n" |
| 778 |
" if (dest_keyring == -1) {\n" |
| 779 |
" fprintf(fp, \"KEYCTL_GET_KEYRING_ID failed: %s\\[rs]n\",\n" |
| 780 |
" strerror(errno));\n" |
| 781 |
" exit(EXIT_FAILURE);\n" |
| 782 |
" }\n" |
| 783 |
"\\&\n" |
| 784 |
" fprintf(fp, \"Destination keyring: %jx\\[rs]n\", (uintmax_t) dest_keyring);\n" |
| 785 |
"\\&\n" |
| 786 |
" /*\n" |
| 787 |
" * Fetch the description of the authorization key. This\n" |
| 788 |
" * allows us to see the key type, UID, GID, permissions,\n" |
| 789 |
" * and description (name) of the key. Among other things,\n" |
| 790 |
" * we will see that the name of the key is a hexadecimal\n" |
| 791 |
" * string representing the ID of the key to be instantiated.\n" |
| 792 |
" */\n" |
| 793 |
" if (keyctl(KEYCTL_DESCRIBE, KEY_SPEC_REQKEY_AUTH_KEY,\n" |
| 794 |
" dbuf, sizeof(dbuf)) == -1)\n" |
| 795 |
" {\n" |
| 796 |
" fprintf(fp, \"KEYCTL_DESCRIBE failed: %s\\[rs]n\", strerror(errno));\n" |
| 797 |
" exit(EXIT_FAILURE);\n" |
| 798 |
" }\n" |
| 799 |
"\\&\n" |
| 800 |
" fprintf(fp, \"Auth key description: %s\\[rs]n\", dbuf);\n" |
| 801 |
"\\&\n" |
| 802 |
" /*\n" |
| 803 |
" * Instantiate the key using the callout data that was supplied\n" |
| 804 |
" * in the payload of the authorization key.\n" |
| 805 |
" */\n" |
| 806 |
" if (keyctl(KEYCTL_INSTANTIATE, key_to_instantiate,\n" |
| 807 |
" auth_key_payload, akp_size + 1, dest_keyring) == -1)\n" |
| 808 |
" {\n" |
| 809 |
" fprintf(fp, \"KEYCTL_INSTANTIATE failed: %s\\[rs]n\",\n" |
| 810 |
" strerror(errno));\n" |
| 811 |
" exit(EXIT_FAILURE);\n" |
| 812 |
" }\n" |
| 813 |
"\\&\n" |
| 814 |
" exit(EXIT_SUCCESS);\n" |
| 815 |
"}\n" |
| 816 |
msgstr "" |
| 817 |
|
| 818 |
#. SRC END |
| 819 |
#. type: SH |
| 820 |
#: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide |
| 821 |
#: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed |
| 822 |
#, no-wrap |
| 823 |
msgid "SEE ALSO" |
| 824 |
msgstr "" |
| 825 |
|
| 826 |
#. .BR find_key_by_type_and_name (3) |
| 827 |
#. There is a man page, but this function seems not to exist |
| 828 |
#. type: Plain text |
| 829 |
#: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron |
| 830 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 831 |
msgid "" |
| 832 |
"B<keyctl>(1), B<add_key>(2), B<request_key>(2), B<keyctl>(3), " |
| 833 |
"B<recursive_key_scan>(3), B<recursive_session_key_scan>(3), " |
| 834 |
"B<capabilities>(7), B<credentials>(7), B<keyrings>(7), B<keyutils>(7), " |
| 835 |
"B<persistent-keyring>(7), B<process-keyring>(7), B<session-keyring>(7), " |
| 836 |
"B<thread-keyring>(7), B<user-keyring>(7), B<user_namespaces>(7), B<user-" |
| 837 |
"session-keyring>(7), B<request-key>(8)" |
| 838 |
msgstr "" |
| 839 |
|
| 840 |
#. type: Plain text |
| 841 |
#: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1 |
| 842 |
#: opensuse-tumbleweed |
| 843 |
msgid "The kernel source files under I<Documentation/security/keys/>." |
| 844 |
msgstr "" |
| 845 |
|
| 846 |
#. type: TH |
| 847 |
#: debian-trixie |
| 848 |
#, no-wrap |
| 849 |
msgid "2024-06-15" |
| 850 |
msgstr "" |
| 851 |
|
| 852 |
#. type: TH |
| 853 |
#: debian-trixie |
| 854 |
#, no-wrap |
| 855 |
msgid "Linux man-pages 6.9.1" |
| 856 |
msgstr "" |
| 857 |
|
| 858 |
#. type: Plain text |
| 859 |
#: debian-trixie |
| 860 |
msgid "Standard C library (I<libc>, I<-lc>)" |
| 861 |
msgstr "" |
| 862 |
|
| 863 |
#. type: Plain text |
| 864 |
#: debian-trixie |
| 865 |
msgid "" |
| 866 |
"Alternatively, Linux Key Management Utilities (I<libkeyutils>, I<-" |
| 867 |
"lkeyutils>); see VERSIONS." |
| 868 |
msgstr "" |
| 869 |
|
| 870 |
#. type: Plain text |
| 871 |
#: debian-trixie |
| 872 |
#, no-wrap |
| 873 |
msgid "" |
| 874 |
"B<#include E<lt>linux/keyctl.hE<gt>> /* Definition of B<KEY*> constants */\n" |
| 875 |
"B<#include E<lt>sys/syscall.hE<gt>> /* Definition of B<SYS_*> constants */\n" |
| 876 |
"B<#include E<lt>unistd.hE<gt>>\n" |
| 877 |
msgstr "" |
| 878 |
|
| 879 |
#. type: Plain text |
| 880 |
#: debian-trixie |
| 881 |
#, no-wrap |
| 882 |
msgid "" |
| 883 |
"B<long syscall(SYS_keyctl, int >I<operation>B<, unsigned long >I<arg2>B<,>\n" |
| 884 |
"B< unsigned long >I<arg3>B<, unsigned long >I<arg4>B<,>\n" |
| 885 |
"B< unsigned long >I<arg5>B<);>\n" |
| 886 |
msgstr "" |
| 887 |
|
| 888 |
#. type: Plain text |
| 889 |
#: debian-trixie |
| 890 |
msgid "" |
| 891 |
"I<Note>: glibc provides no wrapper for B<keyctl>(), necessitating the use of " |
| 892 |
"B<syscall>(2)." |
| 893 |
msgstr "" |
| 894 |
|
| 895 |
#. type: Plain text |
| 896 |
#: debian-trixie |
| 897 |
msgid "" |
| 898 |
"The operation performed by B<keyctl>() is determined by the value of the " |
| 899 |
"I<operation> argument. Each of these operations is wrapped by the " |
| 900 |
"I<libkeyutils> library (provided by the I<keyutils> package) into individual " |
| 901 |
"functions (noted below) to permit the compiler to check types." |
| 902 |
msgstr "" |
| 903 |
|
| 904 |
#. type: Plain text |
| 905 |
#: debian-trixie |
| 906 |
msgid "The permitted values for I<operation> are:" |
| 907 |
msgstr "" |
| 908 |
|
| 909 |
#. type: TP |
| 910 |
#: debian-trixie |
| 911 |
#, no-wrap |
| 912 |
msgid "B<KEYCTL_GET_KEYRING_ID> (since Linux 2.6.10)" |
| 913 |
msgstr "" |
| 914 |
|
| 915 |
#. type: Plain text |
| 916 |
#: debian-trixie |
| 917 |
msgid "Map a special key ID to a real key ID for this process." |
| 918 |
msgstr "" |
| 919 |
|
| 920 |
#. type: Plain text |
| 921 |
#: debian-trixie |
| 922 |
msgid "" |
| 923 |
"This operation looks up the special key whose ID is provided in I<arg2> " |
| 924 |
"(cast to I<key_serial_t>). If the special key is found, the ID of the " |
| 925 |
"corresponding real key is returned as the function result. The following " |
| 926 |
"values may be specified in I<arg2>:" |
| 927 |
msgstr "" |
| 928 |
|
| 929 |
#. type: TP |
| 930 |
#: debian-trixie |
| 931 |
#, no-wrap |
| 932 |
msgid "B<KEY_SPEC_THREAD_KEYRING>" |
| 933 |
msgstr "" |
| 934 |
|
| 935 |
#. type: Plain text |
| 936 |
#: debian-trixie |
| 937 |
msgid "" |
| 938 |
"This specifies the calling thread's thread-specific keyring. See B<thread-" |
| 939 |
"keyring>(7)." |
| 940 |
msgstr "" |
| 941 |
|
| 942 |
#. type: TP |
| 943 |
#: debian-trixie |
| 944 |
#, no-wrap |
| 945 |
msgid "B<KEY_SPEC_PROCESS_KEYRING>" |
| 946 |
msgstr "" |
| 947 |
|
| 948 |
#. type: Plain text |
| 949 |
#: debian-trixie |
| 950 |
msgid "" |
| 951 |
"This specifies the caller's process-specific keyring. See B<process-" |
| 952 |
"keyring>(7)." |
| 953 |
msgstr "" |
| 954 |
|
| 955 |
#. type: TP |
| 956 |
#: debian-trixie |
| 957 |
#, no-wrap |
| 958 |
msgid "B<KEY_SPEC_SESSION_KEYRING>" |
| 959 |
msgstr "" |
| 960 |
|
| 961 |
#. type: Plain text |
| 962 |
#: debian-trixie |
| 963 |
msgid "" |
| 964 |
"This specifies the caller's session-specific keyring. See B<session-" |
| 965 |
"keyring>(7)." |
| 966 |
msgstr "" |
| 967 |
|
| 968 |
#. type: TP |
| 969 |
#: debian-trixie |
| 970 |
#, no-wrap |
| 971 |
msgid "B<KEY_SPEC_USER_KEYRING>" |
| 972 |
msgstr "" |
| 973 |
|
| 974 |
#. type: Plain text |
| 975 |
#: debian-trixie |
| 976 |
msgid "" |
| 977 |
"This specifies the caller's UID-specific keyring. See B<user-keyring>(7)." |
| 978 |
msgstr "" |
| 979 |
|
| 980 |
#. type: TP |
| 981 |
#: debian-trixie |
| 982 |
#, no-wrap |
| 983 |
msgid "B<KEY_SPEC_USER_SESSION_KEYRING>" |
| 984 |
msgstr "" |
| 985 |
|
| 986 |
#. type: Plain text |
| 987 |
#: debian-trixie |
| 988 |
msgid "" |
| 989 |
"This specifies the caller's UID-session keyring. See B<user-session-" |
| 990 |
"keyring>(7)." |
| 991 |
msgstr "" |
| 992 |
|
| 993 |
#. type: TP |
| 994 |
#: debian-trixie |
| 995 |
#, no-wrap |
| 996 |
msgid "B<KEY_SPEC_REQKEY_AUTH_KEY> (since Linux 2.6.16)" |
| 997 |
msgstr "" |
| 998 |
|
| 999 |
#. commit b5f545c880a2a47947ba2118b2509644ab7a2969 |
| 1000 |
#. type: Plain text |
| 1001 |
#: debian-trixie |
| 1002 |
msgid "" |
| 1003 |
"This specifies the authorization key created by B<request_key>(2) and " |
| 1004 |
"passed to the process it spawns to generate a key. This key is available " |
| 1005 |
"only in a B<request-key>(8)-style program that was passed an authorization " |
| 1006 |
"key by the kernel and ceases to be available once the requested key has been " |
| 1007 |
"instantiated; see B<request_key>(2)." |
| 1008 |
msgstr "" |
| 1009 |
|
| 1010 |
#. type: TP |
| 1011 |
#: debian-trixie |
| 1012 |
#, no-wrap |
| 1013 |
msgid "B<KEY_SPEC_REQUESTOR_KEYRING> (since Linux 2.6.29)" |
| 1014 |
msgstr "" |
| 1015 |
|
| 1016 |
#. commit 8bbf4976b59fc9fc2861e79cab7beb3f6d647640 |
| 1017 |
#. type: Plain text |
| 1018 |
#: debian-trixie |
| 1019 |
msgid "" |
| 1020 |
"This specifies the key ID for the B<request_key>(2) destination keyring. " |
| 1021 |
"This keyring is available only in a B<request-key>(8)-style program that was " |
| 1022 |
"passed an authorization key by the kernel and ceases to be available once " |
| 1023 |
"the requested key has been instantiated; see B<request_key>(2)." |
| 1024 |
msgstr "" |
| 1025 |
|
| 1026 |
#. The keyctl_get_keyring_ID.3 page says that a new key |
| 1027 |
#. "will be created *if it is appropriate to do so**. What is the |
| 1028 |
#. determiner for appropriate? |
| 1029 |
#. David Howells: Some special keys such as KEY_SPEC_REQKEY_AUTH_KEY |
| 1030 |
#. wouldn't get created but user/user-session/session keyring would |
| 1031 |
#. be created. |
| 1032 |
#. type: Plain text |
| 1033 |
#: debian-trixie |
| 1034 |
msgid "" |
| 1035 |
"The behavior if the key specified in I<arg2> does not exist depends on the " |
| 1036 |
"value of I<arg3> (cast to I<int>). If I<arg3> contains a nonzero value, " |
| 1037 |
"then\\[em]if it is appropriate to do so (e.g., when looking up the user, " |
| 1038 |
"user-session, or session key)\\[em]a new key is created and its real key ID " |
| 1039 |
"returned as the function result. Otherwise, the operation fails with the " |
| 1040 |
"error B<ENOKEY>." |
| 1041 |
msgstr "" |
| 1042 |
|
| 1043 |
#. type: Plain text |
| 1044 |
#: debian-trixie |
| 1045 |
msgid "" |
| 1046 |
"If a valid key ID is specified in I<arg2>, and the key exists, then this " |
| 1047 |
"operation simply returns the key ID. If the key does not exist, the call " |
| 1048 |
"fails with error B<ENOKEY>." |
| 1049 |
msgstr "" |
| 1050 |
|
| 1051 |
#. type: Plain text |
| 1052 |
#: debian-trixie |
| 1053 |
msgid "" |
| 1054 |
"The caller must have I<search> permission on a keyring in order for it to be " |
| 1055 |
"found." |
| 1056 |
msgstr "" |
| 1057 |
|
| 1058 |
#. type: Plain text |
| 1059 |
#: debian-trixie |
| 1060 |
msgid "The arguments I<arg4> and I<arg5> are ignored." |
| 1061 |
msgstr "" |
| 1062 |
|
| 1063 |
#. type: Plain text |
| 1064 |
#: debian-trixie |
| 1065 |
msgid "" |
| 1066 |
"This operation is exposed by I<libkeyutils> via the function " |
| 1067 |
"B<keyctl_get_keyring_ID>(3)." |
| 1068 |
msgstr "" |
| 1069 |
|
| 1070 |
#. type: TP |
| 1071 |
#: debian-trixie |
| 1072 |
#, no-wrap |
| 1073 |
msgid "B<KEYCTL_JOIN_SESSION_KEYRING> (since Linux 2.6.10)" |
| 1074 |
msgstr "" |
| 1075 |
|
| 1076 |
#. This may be useful in conjunction with some sort of |
| 1077 |
#. session management framework that is employed by the application. |
| 1078 |
#. type: Plain text |
| 1079 |
#: debian-trixie |
| 1080 |
msgid "" |
| 1081 |
"Replace the session keyring this process subscribes to with a new session " |
| 1082 |
"keyring." |
| 1083 |
msgstr "" |
| 1084 |
|
| 1085 |
#. type: Plain text |
| 1086 |
#: debian-trixie |
| 1087 |
msgid "" |
| 1088 |
"If I<arg2> is NULL, an anonymous keyring with the description \"_ses\" is " |
| 1089 |
"created and the process is subscribed to that keyring as its session " |
| 1090 |
"keyring, displacing the previous session keyring." |
| 1091 |
msgstr "" |
| 1092 |
|
| 1093 |
#. type: Plain text |
| 1094 |
#: debian-trixie |
| 1095 |
msgid "" |
| 1096 |
"Otherwise, I<arg2> (cast to I<char\\ *>) is treated as the description " |
| 1097 |
"(name) of a keyring, and the behavior is as follows:" |
| 1098 |
msgstr "" |
| 1099 |
|
| 1100 |
#. type: Plain text |
| 1101 |
#: debian-trixie |
| 1102 |
msgid "" |
| 1103 |
"If a keyring with a matching description exists, the process will attempt to " |
| 1104 |
"subscribe to that keyring as its session keyring if possible; if that is not " |
| 1105 |
"possible, an error is returned. In order to subscribe to the keyring, the " |
| 1106 |
"caller must have I<search> permission on the keyring." |
| 1107 |
msgstr "" |
| 1108 |
|
| 1109 |
#. type: Plain text |
| 1110 |
#: debian-trixie |
| 1111 |
msgid "" |
| 1112 |
"If a keyring with a matching description does not exist, then a new keyring " |
| 1113 |
"with the specified description is created, and the process is subscribed to " |
| 1114 |
"that keyring as its session keyring." |
| 1115 |
msgstr "" |
| 1116 |
|
| 1117 |
#. type: Plain text |
| 1118 |
#: debian-trixie |
| 1119 |
msgid "The arguments I<arg3>, I<arg4>, and I<arg5> are ignored." |
| 1120 |
msgstr "" |
| 1121 |
|
| 1122 |
#. type: Plain text |
| 1123 |
#: debian-trixie |
| 1124 |
msgid "" |
| 1125 |
"This operation is exposed by I<libkeyutils> via the function " |
| 1126 |
"B<keyctl_join_session_keyring>(3)." |
| 1127 |
msgstr "" |
| 1128 |
|
| 1129 |
#. type: TP |
| 1130 |
#: debian-trixie |
| 1131 |
#, no-wrap |
| 1132 |
msgid "B<KEYCTL_UPDATE> (since Linux 2.6.10)" |
| 1133 |
msgstr "" |
| 1134 |
|
| 1135 |
#. type: Plain text |
| 1136 |
#: debian-trixie |
| 1137 |
msgid "Update a key's data payload." |
| 1138 |
msgstr "" |
| 1139 |
|
| 1140 |
#. type: Plain text |
| 1141 |
#: debian-trixie |
| 1142 |
msgid "" |
| 1143 |
"The I<arg2> argument (cast to I<key_serial_t>) specifies the ID of the key " |
| 1144 |
"to be updated. The I<arg3> argument (cast to I<void\\ *>) points to the " |
| 1145 |
"new payload and I<arg4> (cast to I<size_t>) contains the new payload size " |
| 1146 |
"in bytes." |
| 1147 |
msgstr "" |
| 1148 |
|
| 1149 |
#. type: Plain text |
| 1150 |
#: debian-trixie |
| 1151 |
msgid "" |
| 1152 |
"The caller must have I<write> permission on the key specified and the key " |
| 1153 |
"type must support updating." |
| 1154 |
msgstr "" |
| 1155 |
|
| 1156 |
#. type: Plain text |
| 1157 |
#: debian-trixie |
| 1158 |
msgid "" |
| 1159 |
"A negatively instantiated key (see the description of B<KEYCTL_REJECT>) can " |
| 1160 |
"be positively instantiated with this operation." |
| 1161 |
msgstr "" |
| 1162 |
|
| 1163 |
#. type: Plain text |
| 1164 |
#: debian-trixie |
| 1165 |
msgid "The I<arg5> argument is ignored." |
| 1166 |
msgstr "" |
| 1167 |
|
| 1168 |
#. type: Plain text |
| 1169 |
#: debian-trixie |
| 1170 |
msgid "" |
| 1171 |
"This operation is exposed by I<libkeyutils> via the function " |
| 1172 |
"B<keyctl_update>(3)." |
| 1173 |
msgstr "" |
| 1174 |
|
| 1175 |
#. type: TP |
| 1176 |
#: debian-trixie |
| 1177 |
#, no-wrap |
| 1178 |
msgid "B<KEYCTL_REVOKE> (since Linux 2.6.10)" |
| 1179 |
msgstr "" |
| 1180 |
|
| 1181 |
#. type: Plain text |
| 1182 |
#: debian-trixie |
| 1183 |
msgid "" |
| 1184 |
"Revoke the key with the ID provided in I<arg2> (cast to I<key_serial_t>). " |
| 1185 |
"The key is scheduled for garbage collection; it will no longer be findable, " |
| 1186 |
"and will be unavailable for further operations. Further attempts to use the " |
| 1187 |
"key will fail with the error B<EKEYREVOKED>." |
| 1188 |
msgstr "" |
| 1189 |
|
| 1190 |
#. Keys with the KEY_FLAG_KEEP bit set cause an EPERM |
| 1191 |
#. error for KEYCTL_REVOKE. Does this need to be documented? |
| 1192 |
#. David Howells: No significance for user space. |
| 1193 |
#. type: Plain text |
| 1194 |
#: debian-trixie |
| 1195 |
msgid "The caller must have I<write> or I<setattr> permission on the key." |
| 1196 |
msgstr "" |
| 1197 |
|
| 1198 |
#. type: Plain text |
| 1199 |
#: debian-trixie |
| 1200 |
msgid "" |
| 1201 |
"This operation is exposed by I<libkeyutils> via the function " |
| 1202 |
"B<keyctl_revoke>(3)." |
| 1203 |
msgstr "" |
| 1204 |
|
| 1205 |
#. type: TP |
| 1206 |
#: debian-trixie |
| 1207 |
#, no-wrap |
| 1208 |
msgid "B<KEYCTL_CHOWN> (since Linux 2.6.10)" |
| 1209 |
msgstr "" |
| 1210 |
|
| 1211 |
#. type: Plain text |
| 1212 |
#: debian-trixie |
| 1213 |
msgid "Change the ownership (user and group ID) of a key." |
| 1214 |
msgstr "" |
| 1215 |
|
| 1216 |
#. type: Plain text |
| 1217 |
#: debian-trixie |
| 1218 |
msgid "" |
| 1219 |
"The I<arg2> argument (cast to I<key_serial_t>) contains the key ID. The " |
| 1220 |
"I<arg3> argument (cast to I<uid_t>) contains the new user ID (or -1 in case " |
| 1221 |
"the user ID shouldn't be changed). The I<arg4> argument (cast to I<gid_t>) " |
| 1222 |
"contains the new group ID (or -1 in case the group ID shouldn't be changed)." |
| 1223 |
msgstr "" |
| 1224 |
|
| 1225 |
#. type: Plain text |
| 1226 |
#: debian-trixie |
| 1227 |
msgid "The key must grant the caller I<setattr> permission." |
| 1228 |
msgstr "" |
| 1229 |
|
| 1230 |
#. type: Plain text |
| 1231 |
#: debian-trixie |
| 1232 |
msgid "" |
| 1233 |
"For the UID to be changed, or for the GID to be changed to a group the " |
| 1234 |
"caller is not a member of, the caller must have the B<CAP_SYS_ADMIN> " |
| 1235 |
"capability (see B<capabilities>(7))." |
| 1236 |
msgstr "" |
| 1237 |
|
| 1238 |
#. type: Plain text |
| 1239 |
#: debian-trixie |
| 1240 |
msgid "" |
| 1241 |
"If the UID is to be changed, the new user must have sufficient quota to " |
| 1242 |
"accept the key. The quota deduction will be removed from the old user to " |
| 1243 |
"the new user should the UID be changed." |
| 1244 |
msgstr "" |
| 1245 |
|
| 1246 |
#. type: Plain text |
| 1247 |
#: debian-trixie |
| 1248 |
msgid "" |
| 1249 |
"This operation is exposed by I<libkeyutils> via the function " |
| 1250 |
"B<keyctl_chown>(3)." |
| 1251 |
msgstr "" |
| 1252 |
|
| 1253 |
#. type: TP |
| 1254 |
#: debian-trixie |
| 1255 |
#, no-wrap |
| 1256 |
msgid "B<KEYCTL_SETPERM> (since Linux 2.6.10)" |
| 1257 |
msgstr "" |
| 1258 |
|
| 1259 |
#. type: Plain text |
| 1260 |
#: debian-trixie |
| 1261 |
msgid "" |
| 1262 |
"Change the permissions of the key with the ID provided in the I<arg2> " |
| 1263 |
"argument (cast to I<key_serial_t>) to the permissions provided in the " |
| 1264 |
"I<arg3> argument (cast to I<key_perm_t>)." |
| 1265 |
msgstr "" |
| 1266 |
|
| 1267 |
#. type: Plain text |
| 1268 |
#: debian-trixie |
| 1269 |
msgid "" |
| 1270 |
"If the caller doesn't have the B<CAP_SYS_ADMIN> capability, it can change " |
| 1271 |
"permissions only for the keys it owns. (More precisely: the caller's " |
| 1272 |
"filesystem UID must match the UID of the key.)" |
| 1273 |
msgstr "" |
| 1274 |
|
| 1275 |
#. FIXME Above, is it really intended that a privileged process can't |
| 1276 |
#. override the lack of the 'setattr' permission? |
| 1277 |
#. type: Plain text |
| 1278 |
#: debian-trixie |
| 1279 |
msgid "" |
| 1280 |
"The key must grant I<setattr> permission to the caller I<regardless> of the " |
| 1281 |
"caller's capabilities." |
| 1282 |
msgstr "" |
| 1283 |
|
| 1284 |
#. type: Plain text |
| 1285 |
#: debian-trixie |
| 1286 |
msgid "" |
| 1287 |
"The permissions in I<arg3> specify masks of available operations for each of " |
| 1288 |
"the following user categories:" |
| 1289 |
msgstr "" |
| 1290 |
|
| 1291 |
#. type: TP |
| 1292 |
#: debian-trixie |
| 1293 |
#, no-wrap |
| 1294 |
msgid "I<possessor> (since Linux 2.6.14)" |
| 1295 |
msgstr "" |
| 1296 |
|
| 1297 |
#. commit 664cceb0093b755739e56572b836a99104ee8a75 |
| 1298 |
#. type: Plain text |
| 1299 |
#: debian-trixie |
| 1300 |
msgid "" |
| 1301 |
"This is the permission granted to a process that possesses the key (has it " |
| 1302 |
"attached searchably to one of the process's keyrings); see B<keyrings>(7)." |
| 1303 |
msgstr "" |
| 1304 |
|
| 1305 |
#. type: TP |
| 1306 |
#: debian-trixie |
| 1307 |
#, no-wrap |
| 1308 |
msgid "I<user>" |
| 1309 |
msgstr "" |
| 1310 |
|
| 1311 |
#. type: Plain text |
| 1312 |
#: debian-trixie |
| 1313 |
msgid "" |
| 1314 |
"This is the permission granted to a process whose filesystem UID matches the " |
| 1315 |
"UID of the key." |
| 1316 |
msgstr "" |
| 1317 |
|
| 1318 |
#. type: TP |
| 1319 |
#: debian-trixie |
| 1320 |
#, no-wrap |
| 1321 |
msgid "I<group>" |
| 1322 |
msgstr "" |
| 1323 |
|
| 1324 |
#. type: Plain text |
| 1325 |
#: debian-trixie |
| 1326 |
msgid "" |
| 1327 |
"This is the permission granted to a process whose filesystem GID or any of " |
| 1328 |
"its supplementary GIDs matches the GID of the key." |
| 1329 |
msgstr "" |
| 1330 |
|
| 1331 |
#. type: TP |
| 1332 |
#: debian-trixie |
| 1333 |
#, no-wrap |
| 1334 |
msgid "I<other>" |
| 1335 |
msgstr "" |
| 1336 |
|
| 1337 |
#. type: Plain text |
| 1338 |
#: debian-trixie |
| 1339 |
msgid "" |
| 1340 |
"This is the permission granted to other processes that do not match the " |
| 1341 |
"I<user> and I<group> categories." |
| 1342 |
msgstr "" |
| 1343 |
|
| 1344 |
#. type: Plain text |
| 1345 |
#: debian-trixie |
| 1346 |
msgid "" |
| 1347 |
"The I<user>, I<group>, and I<other> categories are exclusive: if a process " |
| 1348 |
"matches the I<user> category, it will not receive permissions granted in the " |
| 1349 |
"I<group> category; if a process matches the I<user> or I<group> category, " |
| 1350 |
"then it will not receive permissions granted in the I<other> category." |
| 1351 |
msgstr "" |
| 1352 |
|
| 1353 |
#. type: Plain text |
| 1354 |
#: debian-trixie |
| 1355 |
msgid "" |
| 1356 |
"The I<possessor> category grants permissions that are cumulative with the " |
| 1357 |
"grants from the I<user>, I<group>, or I<other> category." |
| 1358 |
msgstr "" |
| 1359 |
|
| 1360 |
#. type: Plain text |
| 1361 |
#: debian-trixie |
| 1362 |
msgid "" |
| 1363 |
"Each permission mask is eight bits in size, with only six bits currently " |
| 1364 |
"used. The available permissions are:" |
| 1365 |
msgstr "" |
| 1366 |
|
| 1367 |
#. type: TP |
| 1368 |
#: debian-trixie |
| 1369 |
#, no-wrap |
| 1370 |
msgid "I<view>" |
| 1371 |
msgstr "" |
| 1372 |
|
| 1373 |
#. type: Plain text |
| 1374 |
#: debian-trixie |
| 1375 |
msgid "This permission allows reading attributes of a key." |
| 1376 |
msgstr "" |
| 1377 |
|
| 1378 |
#. type: Plain text |
| 1379 |
#: debian-trixie |
| 1380 |
msgid "This permission is required for the B<KEYCTL_DESCRIBE> operation." |
| 1381 |
msgstr "" |
| 1382 |
|
| 1383 |
#. type: Plain text |
| 1384 |
#: debian-trixie |
| 1385 |
msgid "" |
| 1386 |
"The permission bits for each category are B<KEY_POS_VIEW>, B<KEY_USR_VIEW>, " |
| 1387 |
"B<KEY_GRP_VIEW>, and B<KEY_OTH_VIEW>." |
| 1388 |
msgstr "" |
| 1389 |
|
| 1390 |
#. type: TP |
| 1391 |
#: debian-trixie |
| 1392 |
#, no-wrap |
| 1393 |
msgid "I<read>" |
| 1394 |
msgstr "" |
| 1395 |
|
| 1396 |
#. type: Plain text |
| 1397 |
#: debian-trixie |
| 1398 |
msgid "This permission allows reading a key's payload." |
| 1399 |
msgstr "" |
| 1400 |
|
| 1401 |
#. type: Plain text |
| 1402 |
#: debian-trixie |
| 1403 |
msgid "This permission is required for the B<KEYCTL_READ> operation." |
| 1404 |
msgstr "" |
| 1405 |
|
| 1406 |
#. type: Plain text |
| 1407 |
#: debian-trixie |
| 1408 |
msgid "" |
| 1409 |
"The permission bits for each category are B<KEY_POS_READ>, B<KEY_USR_READ>, " |
| 1410 |
"B<KEY_GRP_READ>, and B<KEY_OTH_READ>." |
| 1411 |
msgstr "" |
| 1412 |
|
| 1413 |
#. type: TP |
| 1414 |
#: debian-trixie |
| 1415 |
#, no-wrap |
| 1416 |
msgid "I<write>" |
| 1417 |
msgstr "" |
| 1418 |
|
| 1419 |
#. type: Plain text |
| 1420 |
#: debian-trixie |
| 1421 |
msgid "" |
| 1422 |
"This permission allows update or instantiation of a key's payload. For a " |
| 1423 |
"keyring, it allows keys to be linked and unlinked from the keyring," |
| 1424 |
msgstr "" |
| 1425 |
|
| 1426 |
#. type: Plain text |
| 1427 |
#: debian-trixie |
| 1428 |
msgid "" |
| 1429 |
"This permission is required for the B<KEYCTL_UPDATE>, B<KEYCTL_REVOKE>, " |
| 1430 |
"B<KEYCTL_CLEAR>, B<KEYCTL_LINK>, and B<KEYCTL_UNLINK> operations." |
| 1431 |
msgstr "" |
| 1432 |
|
| 1433 |
#. type: Plain text |
| 1434 |
#: debian-trixie |
| 1435 |
msgid "" |
| 1436 |
"The permission bits for each category are B<KEY_POS_WRITE>, " |
| 1437 |
"B<KEY_USR_WRITE>, B<KEY_GRP_WRITE>, and B<KEY_OTH_WRITE>." |
| 1438 |
msgstr "" |
| 1439 |
|
| 1440 |
#. type: TP |
| 1441 |
#: debian-trixie |
| 1442 |
#, no-wrap |
| 1443 |
msgid "I<search>" |
| 1444 |
msgstr "" |
| 1445 |
|
| 1446 |
#. type: Plain text |
| 1447 |
#: debian-trixie |
| 1448 |
msgid "" |
| 1449 |
"This permission allows keyrings to be searched and keys to be found. " |
| 1450 |
"Searches can recurse only into nested keyrings that have I<search> " |
| 1451 |
"permission set." |
| 1452 |
msgstr "" |
| 1453 |
|
| 1454 |
#. type: Plain text |
| 1455 |
#: debian-trixie |
| 1456 |
msgid "" |
| 1457 |
"This permission is required for the B<KEYCTL_GET_KEYRING_ID>, " |
| 1458 |
"B<KEYCTL_JOIN_SESSION_KEYRING>, B<KEYCTL_SEARCH>, and B<KEYCTL_INVALIDATE> " |
| 1459 |
"operations." |
| 1460 |
msgstr "" |
| 1461 |
|
| 1462 |
#. type: Plain text |
| 1463 |
#: debian-trixie |
| 1464 |
msgid "" |
| 1465 |
"The permission bits for each category are B<KEY_POS_SEARCH>, " |
| 1466 |
"B<KEY_USR_SEARCH>, B<KEY_GRP_SEARCH>, and B<KEY_OTH_SEARCH>." |
| 1467 |
msgstr "" |
| 1468 |
|
| 1469 |
#. type: TP |
| 1470 |
#: debian-trixie |
| 1471 |
#, no-wrap |
| 1472 |
msgid "I<link>" |
| 1473 |
msgstr "" |
| 1474 |
|
| 1475 |
#. type: Plain text |
| 1476 |
#: debian-trixie |
| 1477 |
msgid "This permission allows a key or keyring to be linked to." |
| 1478 |
msgstr "" |
| 1479 |
|
| 1480 |
#. type: Plain text |
| 1481 |
#: debian-trixie |
| 1482 |
msgid "" |
| 1483 |
"This permission is required for the B<KEYCTL_LINK> and " |
| 1484 |
"B<KEYCTL_SESSION_TO_PARENT> operations." |
| 1485 |
msgstr "" |
| 1486 |
|
| 1487 |
#. type: Plain text |
| 1488 |
#: debian-trixie |
| 1489 |
msgid "" |
| 1490 |
"The permission bits for each category are B<KEY_POS_LINK>, B<KEY_USR_LINK>, " |
| 1491 |
"B<KEY_GRP_LINK>, and B<KEY_OTH_LINK>." |
| 1492 |
msgstr "" |
| 1493 |
|
| 1494 |
#. type: TP |
| 1495 |
#: debian-trixie |
| 1496 |
#, no-wrap |
| 1497 |
msgid "I<setattr> (since Linux 2.6.15)." |
| 1498 |
msgstr "" |
| 1499 |
|
| 1500 |
#. type: Plain text |
| 1501 |
#: debian-trixie |
| 1502 |
msgid "" |
| 1503 |
"This permission allows a key's UID, GID, and permissions mask to be changed." |
| 1504 |
msgstr "" |
| 1505 |
|
| 1506 |
#. type: Plain text |
| 1507 |
#: debian-trixie |
| 1508 |
msgid "" |
| 1509 |
"This permission is required for the B<KEYCTL_REVOKE>, B<KEYCTL_CHOWN>, and " |
| 1510 |
"B<KEYCTL_SETPERM> operations." |
| 1511 |
msgstr "" |
| 1512 |
|
| 1513 |
#. type: Plain text |
| 1514 |
#: debian-trixie |
| 1515 |
msgid "" |
| 1516 |
"The permission bits for each category are B<KEY_POS_SETATTR>, " |
| 1517 |
"B<KEY_USR_SETATTR>, B<KEY_GRP_SETATTR>, and B<KEY_OTH_SETATTR>." |
| 1518 |
msgstr "" |
| 1519 |
|
| 1520 |
#. type: Plain text |
| 1521 |
#: debian-trixie |
| 1522 |
msgid "" |
| 1523 |
"As a convenience, the following macros are defined as masks for all of the " |
| 1524 |
"permission bits in each of the user categories: B<KEY_POS_ALL>, " |
| 1525 |
"B<KEY_USR_ALL>, B<KEY_GRP_ALL>, and B<KEY_OTH_ALL>." |
| 1526 |
msgstr "" |
| 1527 |
|
| 1528 |
#. type: Plain text |
| 1529 |
#: debian-trixie |
| 1530 |
msgid "The I<arg4> and I<arg5> arguments are ignored." |
| 1531 |
msgstr "" |
| 1532 |
|
| 1533 |
#. type: Plain text |
| 1534 |
#: debian-trixie |
| 1535 |
msgid "" |
| 1536 |
"This operation is exposed by I<libkeyutils> via the function " |
| 1537 |
"B<keyctl_setperm>(3)." |
| 1538 |
msgstr "" |
| 1539 |
|
| 1540 |
#. type: TP |
| 1541 |
#: debian-trixie |
| 1542 |
#, no-wrap |
| 1543 |
msgid "B<KEYCTL_DESCRIBE> (since Linux 2.6.10)" |
| 1544 |
msgstr "" |
| 1545 |
|
| 1546 |
#. type: Plain text |
| 1547 |
#: debian-trixie |
| 1548 |
msgid "Obtain a string describing the attributes of a specified key." |
| 1549 |
msgstr "" |
| 1550 |
|
| 1551 |
#. type: Plain text |
| 1552 |
#: debian-trixie |
| 1553 |
msgid "" |
| 1554 |
"The ID of the key to be described is specified in I<arg2> (cast to " |
| 1555 |
"I<key_serial_t>). The descriptive string is returned in the buffer pointed " |
| 1556 |
"to by I<arg3> (cast to I<char\\ *>); I<arg4> (cast to I<size_t>) specifies " |
| 1557 |
"the size of that buffer in bytes." |
| 1558 |
msgstr "" |
| 1559 |
|
| 1560 |
#. type: Plain text |
| 1561 |
#: debian-trixie |
| 1562 |
msgid "The key must grant the caller I<view> permission." |
| 1563 |
msgstr "" |
| 1564 |
|
| 1565 |
#. type: Plain text |
| 1566 |
#: debian-trixie |
| 1567 |
msgid "" |
| 1568 |
"The returned string is null-terminated and contains the following " |
| 1569 |
"information about the key:" |
| 1570 |
msgstr "" |
| 1571 |
|
| 1572 |
#. type: Plain text |
| 1573 |
#: debian-trixie |
| 1574 |
msgid "I<type>;I<uid>;I<gid>;I<perm>;I<description>" |
| 1575 |
msgstr "" |
| 1576 |
|
| 1577 |
#. type: Plain text |
| 1578 |
#: debian-trixie |
| 1579 |
msgid "" |
| 1580 |
"In the above, I<type> and I<description> are strings, I<uid> and I<gid> are " |
| 1581 |
"decimal strings, and I<perm> is a hexadecimal permissions mask. The " |
| 1582 |
"descriptive string is written with the following format:" |
| 1583 |
msgstr "" |
| 1584 |
|
| 1585 |
#. type: Plain text |
| 1586 |
#: debian-trixie |
| 1587 |
#, no-wrap |
| 1588 |
msgid "%s;%d;%d;%08x;%s\n" |
| 1589 |
msgstr "" |
| 1590 |
|
| 1591 |
#. FIXME But, the kernel does not enforce the requirement |
| 1592 |
#. that the key description contains no semicolons! |
| 1593 |
#. So, user space has no guarantee here?? |
| 1594 |
#. Either something more needs to be said here, |
| 1595 |
#. or a kernel fix is required. |
| 1596 |
#. type: Plain text |
| 1597 |
#: debian-trixie |
| 1598 |
msgid "" |
| 1599 |
"B<Note: the intention is that the descriptive string should> B<be extensible " |
| 1600 |
"in future kernel versions.> In particular, the I<description> field will not " |
| 1601 |
"contain semicolons; it should be parsed by working backwards from the end of " |
| 1602 |
"the string to find the last semicolon. This allows future semicolon-" |
| 1603 |
"delimited fields to be inserted in the descriptive string in the future." |
| 1604 |
msgstr "" |
| 1605 |
|
| 1606 |
#. Function commentary says it copies up to buflen bytes, but see the |
| 1607 |
#. (buffer && buflen >= ret) condition in keyctl_describe_key() in |
| 1608 |
#. security/keyctl.c |
| 1609 |
#. type: Plain text |
| 1610 |
#: debian-trixie |
| 1611 |
msgid "" |
| 1612 |
"Writing to the buffer is attempted only when I<arg3> is non-NULL and the " |
| 1613 |
"specified buffer size is large enough to accept the descriptive string " |
| 1614 |
"(including the terminating null byte). In order to determine whether the " |
| 1615 |
"buffer size was too small, check to see if the return value of the operation " |
| 1616 |
"is greater than I<arg4>." |
| 1617 |
msgstr "" |
| 1618 |
|
| 1619 |
#. type: Plain text |
| 1620 |
#: debian-trixie |
| 1621 |
msgid "" |
| 1622 |
"This operation is exposed by I<libkeyutils> via the function " |
| 1623 |
"B<keyctl_describe>(3)." |
| 1624 |
msgstr "" |
| 1625 |
|
| 1626 |
#. type: TP |
| 1627 |
#: debian-trixie |
| 1628 |
#, no-wrap |
| 1629 |
msgid "B<KEYCTL_CLEAR>" |
| 1630 |
msgstr "" |
| 1631 |
|
| 1632 |
#. type: Plain text |
| 1633 |
#: debian-trixie |
| 1634 |
msgid "Clear the contents of (i.e., unlink all keys from) a keyring." |
| 1635 |
msgstr "" |
| 1636 |
|
| 1637 |
#. or the error ENOTDIR results |
| 1638 |
#. According to Documentation/security/keys.txt: |
| 1639 |
#. This function can also be used to clear special kernel keyrings if they |
| 1640 |
#. are appropriately marked if the user has CAP_SYS_ADMIN capability. The |
| 1641 |
#. DNS resolver cache keyring is an example of this. |
| 1642 |
#. type: Plain text |
| 1643 |
#: debian-trixie |
| 1644 |
msgid "" |
| 1645 |
"The ID of the key (which must be of keyring type) is provided in I<arg2> " |
| 1646 |
"(cast to I<key_serial_t>)." |
| 1647 |
msgstr "" |
| 1648 |
|
| 1649 |
#. type: Plain text |
| 1650 |
#: debian-trixie |
| 1651 |
msgid "The caller must have I<write> permission on the keyring." |
| 1652 |
msgstr "" |
| 1653 |
|
| 1654 |
#. type: Plain text |
| 1655 |
#: debian-trixie |
| 1656 |
msgid "" |
| 1657 |
"This operation is exposed by I<libkeyutils> via the function " |
| 1658 |
"B<keyctl_clear>(3)." |
| 1659 |
msgstr "" |
| 1660 |
|
| 1661 |
#. type: TP |
| 1662 |
#: debian-trixie |
| 1663 |
#, no-wrap |
| 1664 |
msgid "B<KEYCTL_LINK> (since Linux 2.6.10)" |
| 1665 |
msgstr "" |
| 1666 |
|
| 1667 |
#. type: Plain text |
| 1668 |
#: debian-trixie |
| 1669 |
msgid "Create a link from a keyring to a key." |
| 1670 |
msgstr "" |
| 1671 |
|
| 1672 |
#. type: Plain text |
| 1673 |
#: debian-trixie |
| 1674 |
msgid "" |
| 1675 |
"The key to be linked is specified in I<arg2> (cast to I<key_serial_t>); the " |
| 1676 |
"keyring is specified in I<arg3> (cast to I<key_serial_t>)." |
| 1677 |
msgstr "" |
| 1678 |
|
| 1679 |
#. type: Plain text |
| 1680 |
#: debian-trixie |
| 1681 |
msgid "" |
| 1682 |
"If a key with the same type and description is already linked in the " |
| 1683 |
"keyring, then that key is displaced from the keyring." |
| 1684 |
msgstr "" |
| 1685 |
|
| 1686 |
#. type: Plain text |
| 1687 |
#: debian-trixie |
| 1688 |
msgid "" |
| 1689 |
"Before creating the link, the kernel checks the nesting of the keyrings and " |
| 1690 |
"returns appropriate errors if the link would produce a cycle or if the " |
| 1691 |
"nesting of keyrings would be too deep (The limit on the nesting of keyrings " |
| 1692 |
"is determined by the kernel constant B<KEYRING_SEARCH_MAX_DEPTH>, defined " |
| 1693 |
"with the value 6, and is necessary to prevent overflows on the kernel stack " |
| 1694 |
"when recursively searching keyrings)." |
| 1695 |
msgstr "" |
| 1696 |
|
| 1697 |
#. type: Plain text |
| 1698 |
#: debian-trixie |
| 1699 |
msgid "" |
| 1700 |
"The caller must have I<link> permission on the key being added and I<write> " |
| 1701 |
"permission on the keyring." |
| 1702 |
msgstr "" |
| 1703 |
|
| 1704 |
#. type: Plain text |
| 1705 |
#: debian-trixie |
| 1706 |
msgid "" |
| 1707 |
"This operation is exposed by I<libkeyutils> via the function " |
| 1708 |
"B<keyctl_link>(3)." |
| 1709 |
msgstr "" |
| 1710 |
|
| 1711 |
#. type: TP |
| 1712 |
#: debian-trixie |
| 1713 |
#, no-wrap |
| 1714 |
msgid "B<KEYCTL_UNLINK> (since Linux 2.6.10)" |
| 1715 |
msgstr "" |
| 1716 |
|
| 1717 |
#. type: Plain text |
| 1718 |
#: debian-trixie |
| 1719 |
msgid "Unlink a key from a keyring." |
| 1720 |
msgstr "" |
| 1721 |
|
| 1722 |
#. type: Plain text |
| 1723 |
#: debian-trixie |
| 1724 |
msgid "" |
| 1725 |
"The ID of the key to be unlinked is specified in I<arg2> (cast to " |
| 1726 |
"I<key_serial_t>); the ID of the keyring from which it is to be unlinked is " |
| 1727 |
"specified in I<arg3> (cast to I<key_serial_t>)." |
| 1728 |
msgstr "" |
| 1729 |
|
| 1730 |
#. type: Plain text |
| 1731 |
#: debian-trixie |
| 1732 |
msgid "If the key is not currently linked into the keyring, an error results." |
| 1733 |
msgstr "" |
| 1734 |
|
| 1735 |
#. type: Plain text |
| 1736 |
#: debian-trixie |
| 1737 |
msgid "" |
| 1738 |
"The caller must have I<write> permission on the keyring from which the key " |
| 1739 |
"is being removed." |
| 1740 |
msgstr "" |
| 1741 |
|
| 1742 |
#. type: Plain text |
| 1743 |
#: debian-trixie |
| 1744 |
msgid "" |
| 1745 |
"If the last link to a key is removed, then that key will be scheduled for " |
| 1746 |
"destruction." |
| 1747 |
msgstr "" |
| 1748 |
|
| 1749 |
#. type: Plain text |
| 1750 |
#: debian-trixie |
| 1751 |
msgid "" |
| 1752 |
"This operation is exposed by I<libkeyutils> via the function " |
| 1753 |
"B<keyctl_unlink>(3)." |
| 1754 |
msgstr "" |
| 1755 |
|
| 1756 |
#. type: TP |
| 1757 |
#: debian-trixie |
| 1758 |
#, no-wrap |
| 1759 |
msgid "B<KEYCTL_SEARCH> (since Linux 2.6.10)" |
| 1760 |
msgstr "" |
| 1761 |
|
| 1762 |
#. type: Plain text |
| 1763 |
#: debian-trixie |
| 1764 |
msgid "" |
| 1765 |
"Search for a key in a keyring tree, returning its ID and optionally linking " |
| 1766 |
"it to a specified keyring." |
| 1767 |
msgstr "" |
| 1768 |
|
| 1769 |
#. type: Plain text |
| 1770 |
#: debian-trixie |
| 1771 |
msgid "" |
| 1772 |
"The tree to be searched is specified by passing the ID of the head keyring " |
| 1773 |
"in I<arg2> (cast to I<key_serial_t>). The search is performed breadth-first " |
| 1774 |
"and recursively." |
| 1775 |
msgstr "" |
| 1776 |
|
| 1777 |
#. type: Plain text |
| 1778 |
#: debian-trixie |
| 1779 |
msgid "" |
| 1780 |
"The I<arg3> and I<arg4> arguments specify the key to be searched for: " |
| 1781 |
"I<arg3> (cast as I<char\\ *>) contains the key type (a null-terminated " |
| 1782 |
"character string up to 32 bytes in size, including the terminating null " |
| 1783 |
"byte), and I<arg4> (cast as I<char\\ *>) contains the description of the " |
| 1784 |
"key (a null-terminated character string up to 4096 bytes in size, including " |
| 1785 |
"the terminating null byte)." |
| 1786 |
msgstr "" |
| 1787 |
|
| 1788 |
#. type: Plain text |
| 1789 |
#: debian-trixie |
| 1790 |
msgid "" |
| 1791 |
"The source keyring must grant I<search> permission to the caller. When " |
| 1792 |
"performing the recursive search, only keyrings that grant the caller " |
| 1793 |
"I<search> permission will be searched. Only keys with for which the caller " |
| 1794 |
"has I<search> permission can be found." |
| 1795 |
msgstr "" |
| 1796 |
|
| 1797 |
#. type: Plain text |
| 1798 |
#: debian-trixie |
| 1799 |
msgid "If the key is found, its ID is returned as the function result." |
| 1800 |
msgstr "" |
| 1801 |
|
| 1802 |
#. type: Plain text |
| 1803 |
#: debian-trixie |
| 1804 |
msgid "" |
| 1805 |
"If the key is found and I<arg5> (cast to I<key_serial_t>) is nonzero, then, " |
| 1806 |
"subject to the same constraints and rules as B<KEYCTL_LINK>, the key is " |
| 1807 |
"linked into the keyring whose ID is specified in I<arg5>. If the " |
| 1808 |
"destination keyring specified in I<arg5> already contains a link to a key " |
| 1809 |
"that has the same type and description, then that link will be displaced by " |
| 1810 |
"a link to the key found by this operation." |
| 1811 |
msgstr "" |
| 1812 |
|
| 1813 |
#. type: Plain text |
| 1814 |
#: debian-trixie |
| 1815 |
msgid "" |
| 1816 |
"Instead of valid existing keyring IDs, the source (I<arg2>) and destination " |
| 1817 |
"(I<arg5>) keyrings can be one of the special keyring IDs listed under " |
| 1818 |
"B<KEYCTL_GET_KEYRING_ID>." |
| 1819 |
msgstr "" |
| 1820 |
|
| 1821 |
#. type: Plain text |
| 1822 |
#: debian-trixie |
| 1823 |
msgid "" |
| 1824 |
"This operation is exposed by I<libkeyutils> via the function " |
| 1825 |
"B<keyctl_search>(3)." |
| 1826 |
msgstr "" |
| 1827 |
|
| 1828 |
#. type: TP |
| 1829 |
#: debian-trixie |
| 1830 |
#, no-wrap |
| 1831 |
msgid "B<KEYCTL_READ> (since Linux 2.6.10)" |
| 1832 |
msgstr "" |
| 1833 |
|
| 1834 |
#. type: Plain text |
| 1835 |
#: debian-trixie |
| 1836 |
msgid "Read the payload data of a key." |
| 1837 |
msgstr "" |
| 1838 |
|
| 1839 |
#. including KEY_SPEC_REQKEY_AUTH_KEY |
| 1840 |
#. type: Plain text |
| 1841 |
#: debian-trixie |
| 1842 |
msgid "" |
| 1843 |
"The ID of the key whose payload is to be read is specified in I<arg2> (cast " |
| 1844 |
"to I<key_serial_t>). This can be the ID of an existing key, or any of the " |
| 1845 |
"special key IDs listed for B<KEYCTL_GET_KEYRING_ID>." |
| 1846 |
msgstr "" |
| 1847 |
|
| 1848 |
#. type: Plain text |
| 1849 |
#: debian-trixie |
| 1850 |
msgid "" |
| 1851 |
"The payload is placed in the buffer pointed by I<arg3> (cast to I<char\\ " |
| 1852 |
"*>); the size of that buffer must be specified in I<arg4> (cast to " |
| 1853 |
"I<size_t>)." |
| 1854 |
msgstr "" |
| 1855 |
|
| 1856 |
#. type: Plain text |
| 1857 |
#: debian-trixie |
| 1858 |
msgid "" |
| 1859 |
"The returned data will be processed for presentation according to the key " |
| 1860 |
"type. For example, a keyring will return an array of I<key_serial_t> " |
| 1861 |
"entries representing the IDs of all the keys that are linked to it. The " |
| 1862 |
"I<user> key type will return its data as is. If a key type does not " |
| 1863 |
"implement this function, the operation fails with the error B<EOPNOTSUPP>." |
| 1864 |
msgstr "" |
| 1865 |
|
| 1866 |
#. type: Plain text |
| 1867 |
#: debian-trixie |
| 1868 |
msgid "" |
| 1869 |
"If I<arg3> is not NULL, as much of the payload data as will fit is copied " |
| 1870 |
"into the buffer. On a successful return, the return value is always the " |
| 1871 |
"total size of the payload data. To determine whether the buffer was of " |
| 1872 |
"sufficient size, check to see that the return value is less than or equal to " |
| 1873 |
"the value supplied in I<arg4>." |
| 1874 |
msgstr "" |
| 1875 |
|
| 1876 |
#. type: Plain text |
| 1877 |
#: debian-trixie |
| 1878 |
msgid "" |
| 1879 |
"The key must either grant the caller I<read> permission, or grant the caller " |
| 1880 |
"I<search> permission when searched for from the process keyrings (i.e., the " |
| 1881 |
"key is possessed)." |
| 1882 |
msgstr "" |
| 1883 |
|
| 1884 |
#. type: Plain text |
| 1885 |
#: debian-trixie |
| 1886 |
msgid "" |
| 1887 |
"This operation is exposed by I<libkeyutils> via the function " |
| 1888 |
"B<keyctl_read>(3)." |
| 1889 |
msgstr "" |
| 1890 |
|
| 1891 |
#. type: TP |
| 1892 |
#: debian-trixie |
| 1893 |
#, no-wrap |
| 1894 |
msgid "B<KEYCTL_INSTANTIATE> (since Linux 2.6.10)" |
| 1895 |
msgstr "" |
| 1896 |
|
| 1897 |
#. type: Plain text |
| 1898 |
#: debian-trixie |
| 1899 |
msgid "" |
| 1900 |
"(Positively) instantiate an uninstantiated key with a specified payload." |
| 1901 |
msgstr "" |
| 1902 |
|
| 1903 |
#. type: Plain text |
| 1904 |
#: debian-trixie |
| 1905 |
msgid "" |
| 1906 |
"The ID of the key to be instantiated is provided in I<arg2> (cast to " |
| 1907 |
"I<key_serial_t>)." |
| 1908 |
msgstr "" |
| 1909 |
|
| 1910 |
#. type: Plain text |
| 1911 |
#: debian-trixie |
| 1912 |
msgid "" |
| 1913 |
"The key payload is specified in the buffer pointed to by I<arg3> (cast to " |
| 1914 |
"I<void\\ *>); the size of that buffer is specified in I<arg4> (cast to " |
| 1915 |
"I<size_t>)." |
| 1916 |
msgstr "" |
| 1917 |
|
| 1918 |
#. type: Plain text |
| 1919 |
#: debian-trixie |
| 1920 |
msgid "" |
| 1921 |
"The payload may be a null pointer and the buffer size may be 0 if this is " |
| 1922 |
"supported by the key type (e.g., it is a keyring)." |
| 1923 |
msgstr "" |
| 1924 |
|
| 1925 |
#. type: Plain text |
| 1926 |
#: debian-trixie |
| 1927 |
msgid "" |
| 1928 |
"The operation may be fail if the payload data is in the wrong format or is " |
| 1929 |
"otherwise invalid." |
| 1930 |
msgstr "" |
| 1931 |
|
| 1932 |
#. type: Plain text |
| 1933 |
#: debian-trixie |
| 1934 |
msgid "" |
| 1935 |
"If I<arg5> (cast to I<key_serial_t>) is nonzero, then, subject to the same " |
| 1936 |
"constraints and rules as B<KEYCTL_LINK>, the instantiated key is linked into " |
| 1937 |
"the keyring whose ID specified in I<arg5>." |
| 1938 |
msgstr "" |
| 1939 |
|
| 1940 |
#. type: Plain text |
| 1941 |
#: debian-trixie |
| 1942 |
msgid "" |
| 1943 |
"The caller must have the appropriate authorization key, and once the " |
| 1944 |
"uninstantiated key has been instantiated, the authorization key is revoked. " |
| 1945 |
"In other words, this operation is available only from a B<request-key>(8)-" |
| 1946 |
"style program. See B<request_key>(2) for an explanation of uninstantiated " |
| 1947 |
"keys and key instantiation." |
| 1948 |
msgstr "" |
| 1949 |
|
| 1950 |
#. type: Plain text |
| 1951 |
#: debian-trixie |
| 1952 |
msgid "" |
| 1953 |
"This operation is exposed by I<libkeyutils> via the function " |
| 1954 |
"B<keyctl_instantiate>(3)." |
| 1955 |
msgstr "" |
| 1956 |
|
| 1957 |
#. type: TP |
| 1958 |
#: debian-trixie |
| 1959 |
#, no-wrap |
| 1960 |
msgid "B<KEYCTL_NEGATE> (since Linux 2.6.10)" |
| 1961 |
msgstr "" |
| 1962 |
|
| 1963 |
#. type: Plain text |
| 1964 |
#: debian-trixie |
| 1965 |
msgid "Negatively instantiate an uninstantiated key." |
| 1966 |
msgstr "" |
| 1967 |
|
| 1968 |
#. type: Plain text |
| 1969 |
#: debian-trixie |
| 1970 |
msgid "This operation is equivalent to the call:" |
| 1971 |
msgstr "" |
| 1972 |
|
| 1973 |
#. type: Plain text |
| 1974 |
#: debian-trixie |
| 1975 |
#, no-wrap |
| 1976 |
msgid "keyctl(KEYCTL_REJECT, arg2, arg3, ENOKEY, arg4);\n" |
| 1977 |
msgstr "" |
| 1978 |
|
| 1979 |
#. type: Plain text |
| 1980 |
#: debian-trixie |
| 1981 |
msgid "" |
| 1982 |
"This operation is exposed by I<libkeyutils> via the function " |
| 1983 |
"B<keyctl_negate>(3)." |
| 1984 |
msgstr "" |
| 1985 |
|
| 1986 |
#. type: TP |
| 1987 |
#: debian-trixie |
| 1988 |
#, no-wrap |
| 1989 |
msgid "B<KEYCTL_SET_REQKEY_KEYRING> (since Linux 2.6.13)" |
| 1990 |
msgstr "" |
| 1991 |
|
| 1992 |
#. I.e., calls to the kernel's internal request_key() interface, |
| 1993 |
#. which is distinct from the request_key(2) system call (which |
| 1994 |
#. ultimately employs the kernel-internal interface). |
| 1995 |
#. type: Plain text |
| 1996 |
#: debian-trixie |
| 1997 |
msgid "" |
| 1998 |
"Set the default keyring to which implicitly requested keys will be linked " |
| 1999 |
"for this thread, and return the previous setting. Implicit key requests are " |
| 2000 |
"those made by internal kernel components, such as can occur when, for " |
| 2001 |
"example, opening files on an AFS or NFS filesystem. Setting the default " |
| 2002 |
"keyring also has an effect when requesting a key from user space; see " |
| 2003 |
"B<request_key>(2) for details." |
| 2004 |
msgstr "" |
| 2005 |
|
| 2006 |
#. type: Plain text |
| 2007 |
#: debian-trixie |
| 2008 |
msgid "" |
| 2009 |
"The I<arg2> argument (cast to I<int>) should contain one of the following " |
| 2010 |
"values, to specify the new default keyring:" |
| 2011 |
msgstr "" |
| 2012 |
|
| 2013 |
#. type: TP |
| 2014 |
#: debian-trixie |
| 2015 |
#, no-wrap |
| 2016 |
msgid "B<KEY_REQKEY_DEFL_NO_CHANGE>" |
| 2017 |
msgstr "" |
| 2018 |
|
| 2019 |
#. type: Plain text |
| 2020 |
#: debian-trixie |
| 2021 |
msgid "" |
| 2022 |
"Don't change the default keyring. This can be used to discover the current " |
| 2023 |
"default keyring (without changing it)." |
| 2024 |
msgstr "" |
| 2025 |
|
| 2026 |
#. type: TP |
| 2027 |
#: debian-trixie |
| 2028 |
#, no-wrap |
| 2029 |
msgid "B<KEY_REQKEY_DEFL_DEFAULT>" |
| 2030 |
msgstr "" |
| 2031 |
|
| 2032 |
#. type: Plain text |
| 2033 |
#: debian-trixie |
| 2034 |
msgid "" |
| 2035 |
"This selects the default behaviour, which is to use the thread-specific " |
| 2036 |
"keyring if there is one, otherwise the process-specific keyring if there is " |
| 2037 |
"one, otherwise the session keyring if there is one, otherwise the UID-" |
| 2038 |
"specific session keyring, otherwise the user-specific keyring." |
| 2039 |
msgstr "" |
| 2040 |
|
| 2041 |
#. type: TP |
| 2042 |
#: debian-trixie |
| 2043 |
#, no-wrap |
| 2044 |
msgid "B<KEY_REQKEY_DEFL_THREAD_KEYRING>" |
| 2045 |
msgstr "" |
| 2046 |
|
| 2047 |
#. type: Plain text |
| 2048 |
#: debian-trixie |
| 2049 |
msgid "" |
| 2050 |
"Use the thread-specific keyring (B<thread-keyring>(7)) as the new default " |
| 2051 |
"keyring." |
| 2052 |
msgstr "" |
| 2053 |
|
| 2054 |
#. type: TP |
| 2055 |
#: debian-trixie |
| 2056 |
#, no-wrap |
| 2057 |
msgid "B<KEY_REQKEY_DEFL_PROCESS_KEYRING>" |
| 2058 |
msgstr "" |
| 2059 |
|
| 2060 |
#. type: Plain text |
| 2061 |
#: debian-trixie |
| 2062 |
msgid "" |
| 2063 |
"Use the process-specific keyring (B<process-keyring>(7)) as the new default " |
| 2064 |
"keyring." |
| 2065 |
msgstr "" |
| 2066 |
|
| 2067 |
#. type: TP |
| 2068 |
#: debian-trixie |
| 2069 |
#, no-wrap |
| 2070 |
msgid "B<KEY_REQKEY_DEFL_SESSION_KEYRING>" |
| 2071 |
msgstr "" |
| 2072 |
|
| 2073 |
#. type: Plain text |
| 2074 |
#: debian-trixie |
| 2075 |
msgid "" |
| 2076 |
"Use the session-specific keyring (B<session-keyring>(7)) as the new default " |
| 2077 |
"keyring." |
| 2078 |
msgstr "" |
| 2079 |
|
| 2080 |
#. type: TP |
| 2081 |
#: debian-trixie |
| 2082 |
#, no-wrap |
| 2083 |
msgid "B<KEY_REQKEY_DEFL_USER_KEYRING>" |
| 2084 |
msgstr "" |
| 2085 |
|
| 2086 |
#. type: Plain text |
| 2087 |
#: debian-trixie |
| 2088 |
msgid "" |
| 2089 |
"Use the UID-specific keyring (B<user-keyring>(7)) as the new default " |
| 2090 |
"keyring." |
| 2091 |
msgstr "" |
| 2092 |
|
| 2093 |
#. type: TP |
| 2094 |
#: debian-trixie |
| 2095 |
#, no-wrap |
| 2096 |
msgid "B<KEY_REQKEY_DEFL_USER_SESSION_KEYRING>" |
| 2097 |
msgstr "" |
| 2098 |
|
| 2099 |
#. type: Plain text |
| 2100 |
#: debian-trixie |
| 2101 |
msgid "" |
| 2102 |
"Use the UID-specific session keyring (B<user-session-keyring>(7)) as the " |
| 2103 |
"new default keyring." |
| 2104 |
msgstr "" |
| 2105 |
|
| 2106 |
#. type: TP |
| 2107 |
#: debian-trixie |
| 2108 |
#, no-wrap |
| 2109 |
msgid "B<KEY_REQKEY_DEFL_REQUESTOR_KEYRING> (since Linux 2.6.29)" |
| 2110 |
msgstr "" |
| 2111 |
|
| 2112 |
# |
| 2113 |
# |
| 2114 |
#. 8bbf4976b59fc9fc2861e79cab7beb3f6d647640 |
| 2115 |
#. FIXME The preceding explanation needs to be expanded. |
| 2116 |
#. Is the following correct: |
| 2117 |
#. The requestor keyring is the dest_keyring that |
| 2118 |
#. was supplied to a call to request_key(2)? |
| 2119 |
#. David Howells said: to be checked |
| 2120 |
#. type: Plain text |
| 2121 |
#: debian-trixie |
| 2122 |
msgid "Use the requestor keyring." |
| 2123 |
msgstr "" |
| 2124 |
|
| 2125 |
#. (including the still-unsupported KEY_REQKEY_DEFL_GROUP_KEYRING) |
| 2126 |
#. type: Plain text |
| 2127 |
#: debian-trixie |
| 2128 |
msgid "All other values are invalid." |
| 2129 |
msgstr "" |
| 2130 |
|
| 2131 |
#. type: Plain text |
| 2132 |
#: debian-trixie |
| 2133 |
msgid "" |
| 2134 |
"The setting controlled by this operation is inherited by the child of " |
| 2135 |
"B<fork>(2) and preserved across B<execve>(2)." |
| 2136 |
msgstr "" |
| 2137 |
|
| 2138 |
#. type: Plain text |
| 2139 |
#: debian-trixie |
| 2140 |
msgid "" |
| 2141 |
"This operation is exposed by I<libkeyutils> via the function " |
| 2142 |
"B<keyctl_set_reqkey_keyring>(3)." |
| 2143 |
msgstr "" |
| 2144 |
|
| 2145 |
#. type: TP |
| 2146 |
#: debian-trixie |
| 2147 |
#, no-wrap |
| 2148 |
msgid "B<KEYCTL_SET_TIMEOUT> (since Linux 2.6.16)" |
| 2149 |
msgstr "" |
| 2150 |
|
| 2151 |
#. type: Plain text |
| 2152 |
#: debian-trixie |
| 2153 |
msgid "Set a timeout on a key." |
| 2154 |
msgstr "" |
| 2155 |
|
| 2156 |
#. type: Plain text |
| 2157 |
#: debian-trixie |
| 2158 |
msgid "" |
| 2159 |
"The ID of the key is specified in I<arg2> (cast to I<key_serial_t>). The " |
| 2160 |
"timeout value, in seconds from the current time, is specified in I<arg3> " |
| 2161 |
"(cast to I<unsigned int>). The timeout is measured against the realtime " |
| 2162 |
"clock." |
| 2163 |
msgstr "" |
| 2164 |
|
| 2165 |
#. type: Plain text |
| 2166 |
#: debian-trixie |
| 2167 |
msgid "" |
| 2168 |
"Specifying the timeout value as 0 clears any existing timeout on the key." |
| 2169 |
msgstr "" |
| 2170 |
|
| 2171 |
#. type: Plain text |
| 2172 |
#: debian-trixie |
| 2173 |
msgid "" |
| 2174 |
"The I</proc/keys> file displays the remaining time until each key will " |
| 2175 |
"expire. (This is the only method of discovering the timeout on a key.)" |
| 2176 |
msgstr "" |
| 2177 |
|
| 2178 |
#. type: Plain text |
| 2179 |
#: debian-trixie |
| 2180 |
msgid "" |
| 2181 |
"The caller must either have the I<setattr> permission on the key or hold an " |
| 2182 |
"instantiation authorization token for the key (see B<request_key>(2))." |
| 2183 |
msgstr "" |
| 2184 |
|
| 2185 |
#. type: Plain text |
| 2186 |
#: debian-trixie |
| 2187 |
msgid "" |
| 2188 |
"The key and any links to the key will be automatically garbage collected " |
| 2189 |
"after the timeout expires. Subsequent attempts to access the key will then " |
| 2190 |
"fail with the error B<EKEYEXPIRED>." |
| 2191 |
msgstr "" |
| 2192 |
|
| 2193 |
#. type: Plain text |
| 2194 |
#: debian-trixie |
| 2195 |
msgid "" |
| 2196 |
"This operation cannot be used to set timeouts on revoked, expired, or " |
| 2197 |
"negatively instantiated keys." |
| 2198 |
msgstr "" |
| 2199 |
|
| 2200 |
#. type: Plain text |
| 2201 |
#: debian-trixie |
| 2202 |
msgid "" |
| 2203 |
"This operation is exposed by I<libkeyutils> via the function " |
| 2204 |
"B<keyctl_set_timeout>(3)." |
| 2205 |
msgstr "" |
| 2206 |
|
| 2207 |
#. type: TP |
| 2208 |
#: debian-trixie |
| 2209 |
#, no-wrap |
| 2210 |
msgid "B<KEYCTL_ASSUME_AUTHORITY> (since Linux 2.6.16)" |
| 2211 |
msgstr "" |
| 2212 |
|
| 2213 |
#. type: Plain text |
| 2214 |
#: debian-trixie |
| 2215 |
msgid "" |
| 2216 |
"Assume (or divest) the authority for the calling thread to instantiate a key." |
| 2217 |
msgstr "" |
| 2218 |
|
| 2219 |
#. type: Plain text |
| 2220 |
#: debian-trixie |
| 2221 |
msgid "" |
| 2222 |
"The I<arg2> argument (cast to I<key_serial_t>) specifies either a nonzero " |
| 2223 |
"key ID to assume authority, or the value 0 to divest authority." |
| 2224 |
msgstr "" |
| 2225 |
|
| 2226 |
#. type: Plain text |
| 2227 |
#: debian-trixie |
| 2228 |
msgid "" |
| 2229 |
"If I<arg2> is nonzero, then it specifies the ID of an uninstantiated key for " |
| 2230 |
"which authority is to be assumed. That key can then be instantiated using " |
| 2231 |
"one of B<KEYCTL_INSTANTIATE>, B<KEYCTL_INSTANTIATE_IOV>, B<KEYCTL_REJECT>, " |
| 2232 |
"or B<KEYCTL_NEGATE>. Once the key has been instantiated, the thread is " |
| 2233 |
"automatically divested of authority to instantiate the key." |
| 2234 |
msgstr "" |
| 2235 |
|
| 2236 |
#. type: Plain text |
| 2237 |
#: debian-trixie |
| 2238 |
msgid "" |
| 2239 |
"Authority over a key can be assumed only if the calling thread has present " |
| 2240 |
"in its keyrings the authorization key that is associated with the specified " |
| 2241 |
"key. (In other words, the B<KEYCTL_ASSUME_AUTHORITY> operation is available " |
| 2242 |
"only from a B<request-key>(8)-style program; see B<request_key>(2) for an " |
| 2243 |
"explanation of how this operation is used.) The caller must have I<search> " |
| 2244 |
"permission on the authorization key." |
| 2245 |
msgstr "" |
| 2246 |
|
| 2247 |
#. type: Plain text |
| 2248 |
#: debian-trixie |
| 2249 |
msgid "" |
| 2250 |
"If the specified key has a matching authorization key, then the ID of that " |
| 2251 |
"key is returned. The authorization key can be read (B<KEYCTL_READ>) to " |
| 2252 |
"obtain the callout information passed to B<request_key>(2)." |
| 2253 |
msgstr "" |
| 2254 |
|
| 2255 |
#. type: Plain text |
| 2256 |
#: debian-trixie |
| 2257 |
msgid "" |
| 2258 |
"If the ID given in I<arg2> is 0, then the currently assumed authority is " |
| 2259 |
"cleared (divested), and the value 0 is returned." |
| 2260 |
msgstr "" |
| 2261 |
|
| 2262 |
#. type: Plain text |
| 2263 |
#: debian-trixie |
| 2264 |
msgid "" |
| 2265 |
"The B<KEYCTL_ASSUME_AUTHORITY> mechanism allows a program such as B<request-" |
| 2266 |
"key>(8) to assume the necessary authority to instantiate a new " |
| 2267 |
"uninstantiated key that was created as a consequence of a call to " |
| 2268 |
"B<request_key>(2). For further information, see B<request_key>(2) and the " |
| 2269 |
"kernel source file I<Documentation/security/keys-request-key.txt>." |
| 2270 |
msgstr "" |
| 2271 |
|
| 2272 |
#. type: Plain text |
| 2273 |
#: debian-trixie |
| 2274 |
msgid "" |
| 2275 |
"This operation is exposed by I<libkeyutils> via the function " |
| 2276 |
"B<keyctl_assume_authority>(3)." |
| 2277 |
msgstr "" |
| 2278 |
|
| 2279 |
#. type: TP |
| 2280 |
#: debian-trixie |
| 2281 |
#, no-wrap |
| 2282 |
msgid "B<KEYCTL_GET_SECURITY> (since Linux 2.6.26)" |
| 2283 |
msgstr "" |
| 2284 |
|
| 2285 |
#. commit 70a5bb72b55e82fbfbf1e22cae6975fac58a1e2d |
| 2286 |
#. type: Plain text |
| 2287 |
#: debian-trixie |
| 2288 |
msgid "" |
| 2289 |
"Get the LSM (Linux Security Module) security label of the specified key." |
| 2290 |
msgstr "" |
| 2291 |
|
| 2292 |
#. type: Plain text |
| 2293 |
#: debian-trixie |
| 2294 |
msgid "" |
| 2295 |
"The ID of the key whose security label is to be fetched is specified in " |
| 2296 |
"I<arg2> (cast to I<key_serial_t>). The security label (terminated by a null " |
| 2297 |
"byte) will be placed in the buffer pointed to by I<arg3> argument (cast to " |
| 2298 |
"I<char\\ *>); the size of the buffer must be provided in I<arg4> (cast to " |
| 2299 |
"I<size_t>)." |
| 2300 |
msgstr "" |
| 2301 |
|
| 2302 |
#. type: Plain text |
| 2303 |
#: debian-trixie |
| 2304 |
msgid "" |
| 2305 |
"If I<arg3> is specified as NULL or the buffer size specified in I<arg4> is " |
| 2306 |
"too small, the full size of the security label string (including the " |
| 2307 |
"terminating null byte) is returned as the function result, and nothing is " |
| 2308 |
"copied to the buffer." |
| 2309 |
msgstr "" |
| 2310 |
|
| 2311 |
#. type: Plain text |
| 2312 |
#: debian-trixie |
| 2313 |
msgid "The caller must have I<view> permission on the specified key." |
| 2314 |
msgstr "" |
| 2315 |
|
| 2316 |
#. type: Plain text |
| 2317 |
#: debian-trixie |
| 2318 |
msgid "" |
| 2319 |
"The returned security label string will be rendered in a form appropriate to " |
| 2320 |
"the LSM in force. For example, with SELinux, it may look like:" |
| 2321 |
msgstr "" |
| 2322 |
|
| 2323 |
#. type: Plain text |
| 2324 |
#: debian-trixie |
| 2325 |
#, no-wrap |
| 2326 |
msgid "unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023\n" |
| 2327 |
msgstr "" |
| 2328 |
|
| 2329 |
#. type: Plain text |
| 2330 |
#: debian-trixie |
| 2331 |
msgid "" |
| 2332 |
"If no LSM is currently in force, then an empty string is placed in the " |
| 2333 |
"buffer." |
| 2334 |
msgstr "" |
| 2335 |
|
| 2336 |
#. type: Plain text |
| 2337 |
#: debian-trixie |
| 2338 |
msgid "" |
| 2339 |
"This operation is exposed by I<libkeyutils> via the functions " |
| 2340 |
"B<keyctl_get_security>(3) and B<keyctl_get_security_alloc>(3)." |
| 2341 |
msgstr "" |
| 2342 |
|
| 2343 |
#. type: TP |
| 2344 |
#: debian-trixie |
| 2345 |
#, no-wrap |
| 2346 |
msgid "B<KEYCTL_SESSION_TO_PARENT> (since Linux 2.6.32)" |
| 2347 |
msgstr "" |
| 2348 |
|
| 2349 |
#. commit ee18d64c1f632043a02e6f5ba5e045bb26a5465f |
| 2350 |
#. What is the use case for KEYCTL_SESSION_TO_PARENT? |
| 2351 |
#. David Howells: the Process Authentication Groups people requested this, |
| 2352 |
#. but then didn't use it; maybe there are no users. |
| 2353 |
#. type: Plain text |
| 2354 |
#: debian-trixie |
| 2355 |
msgid "" |
| 2356 |
"Replace the session keyring to which the I<parent> of the calling process " |
| 2357 |
"subscribes with the session keyring of the calling process." |
| 2358 |
msgstr "" |
| 2359 |
|
| 2360 |
#. type: Plain text |
| 2361 |
#: debian-trixie |
| 2362 |
msgid "" |
| 2363 |
"The keyring will be replaced in the parent process at the point where the " |
| 2364 |
"parent next transitions from kernel space to user space." |
| 2365 |
msgstr "" |
| 2366 |
|
| 2367 |
#. type: Plain text |
| 2368 |
#: debian-trixie |
| 2369 |
msgid "" |
| 2370 |
"The keyring must exist and must grant the caller I<link> permission. The " |
| 2371 |
"parent process must be single-threaded and have the same effective ownership " |
| 2372 |
"as this process and must not be set-user-ID or set-group-ID. The UID of the " |
| 2373 |
"parent process's existing session keyring (f it has one), as well as the UID " |
| 2374 |
"of the caller's session keyring much match the caller's effective UID." |
| 2375 |
msgstr "" |
| 2376 |
|
| 2377 |
#. type: Plain text |
| 2378 |
#: debian-trixie |
| 2379 |
msgid "" |
| 2380 |
"The fact that it is the parent process that is affected by this operation " |
| 2381 |
"allows a program such as the shell to start a child process that uses this " |
| 2382 |
"operation to change the shell's session keyring. (This is what the " |
| 2383 |
"B<keyctl>(1) B<new_session> command does.)" |
| 2384 |
msgstr "" |
| 2385 |
|
| 2386 |
#. type: Plain text |
| 2387 |
#: debian-trixie |
| 2388 |
msgid "The arguments I<arg2>, I<arg3>, I<arg4>, and I<arg5> are ignored." |
| 2389 |
msgstr "" |
| 2390 |
|
| 2391 |
#. type: Plain text |
| 2392 |
#: debian-trixie |
| 2393 |
msgid "" |
| 2394 |
"This operation is exposed by I<libkeyutils> via the function " |
| 2395 |
"B<keyctl_session_to_parent>(3)." |
| 2396 |
msgstr "" |
| 2397 |
|
| 2398 |
#. type: TP |
| 2399 |
#: debian-trixie |
| 2400 |
#, no-wrap |
| 2401 |
msgid "B<KEYCTL_REJECT> (since Linux 2.6.39)" |
| 2402 |
msgstr "" |
| 2403 |
|
| 2404 |
#. commit fdd1b94581782a2ddf9124414e5b7a5f48ce2f9c |
| 2405 |
#. type: Plain text |
| 2406 |
#: debian-trixie |
| 2407 |
msgid "" |
| 2408 |
"Mark a key as negatively instantiated and set an expiration timer on the " |
| 2409 |
"key. This operation provides a superset of the functionality of the earlier " |
| 2410 |
"B<KEYCTL_NEGATE> operation." |
| 2411 |
msgstr "" |
| 2412 |
|
| 2413 |
#. type: Plain text |
| 2414 |
#: debian-trixie |
| 2415 |
msgid "" |
| 2416 |
"The ID of the key that is to be negatively instantiated is specified in " |
| 2417 |
"I<arg2> (cast to I<key_serial_t>). The I<arg3> (cast to I<unsigned int>) " |
| 2418 |
"argument specifies the lifetime of the key, in seconds. The I<arg4> " |
| 2419 |
"argument (cast to I<unsigned int>) specifies the error to be returned when " |
| 2420 |
"a search hits this key; typically, this is one of B<EKEYREJECTED>, " |
| 2421 |
"B<EKEYREVOKED>, or B<EKEYEXPIRED>." |
| 2422 |
msgstr "" |
| 2423 |
|
| 2424 |
#. type: Plain text |
| 2425 |
#: debian-trixie |
| 2426 |
msgid "" |
| 2427 |
"If I<arg5> (cast to I<key_serial_t>) is nonzero, then, subject to the same " |
| 2428 |
"constraints and rules as B<KEYCTL_LINK>, the negatively instantiated key is " |
| 2429 |
"linked into the keyring whose ID is specified in I<arg5>." |
| 2430 |
msgstr "" |
| 2431 |
|
| 2432 |
#. type: Plain text |
| 2433 |
#: debian-trixie |
| 2434 |
msgid "" |
| 2435 |
"The caller must have the appropriate authorization key. In other words, " |
| 2436 |
"this operation is available only from a B<request-key>(8)-style program. " |
| 2437 |
"See B<request_key>(2)." |
| 2438 |
msgstr "" |
| 2439 |
|
| 2440 |
#. type: Plain text |
| 2441 |
#: debian-trixie |
| 2442 |
msgid "" |
| 2443 |
"This operation is exposed by I<libkeyutils> via the function " |
| 2444 |
"B<keyctl_reject>(3)." |
| 2445 |
msgstr "" |
| 2446 |
|
| 2447 |
#. type: TP |
| 2448 |
#: debian-trixie |
| 2449 |
#, no-wrap |
| 2450 |
msgid "B<KEYCTL_INSTANTIATE_IOV> (since Linux 2.6.39)" |
| 2451 |
msgstr "" |
| 2452 |
|
| 2453 |
#. commit ee009e4a0d4555ed522a631bae9896399674f063 |
| 2454 |
#. type: Plain text |
| 2455 |
#: debian-trixie |
| 2456 |
msgid "" |
| 2457 |
"Instantiate an uninstantiated key with a payload specified via a vector of " |
| 2458 |
"buffers." |
| 2459 |
msgstr "" |
| 2460 |
|
| 2461 |
#. type: Plain text |
| 2462 |
#: debian-trixie |
| 2463 |
msgid "" |
| 2464 |
"This operation is the same as B<KEYCTL_INSTANTIATE>, but the payload data is " |
| 2465 |
"specified as an array of I<iovec> structures (see B<iovec>(3type))." |
| 2466 |
msgstr "" |
| 2467 |
|
| 2468 |
#. type: Plain text |
| 2469 |
#: debian-trixie |
| 2470 |
msgid "" |
| 2471 |
"The pointer to the payload vector is specified in I<arg3> (cast as I<const " |
| 2472 |
"struct iovec\\ *>). The number of items in the vector is specified in " |
| 2473 |
"I<arg4> (cast as I<unsigned int>)." |
| 2474 |
msgstr "" |
| 2475 |
|
| 2476 |
#. type: Plain text |
| 2477 |
#: debian-trixie |
| 2478 |
msgid "" |
| 2479 |
"The I<arg2> (key ID) and I<arg5> (keyring ID) are interpreted as for " |
| 2480 |
"B<KEYCTL_INSTANTIATE>." |
| 2481 |
msgstr "" |
| 2482 |
|
| 2483 |
#. type: Plain text |
| 2484 |
#: debian-trixie |
| 2485 |
msgid "" |
| 2486 |
"This operation is exposed by I<libkeyutils> via the function " |
| 2487 |
"B<keyctl_instantiate_iov>(3)." |
| 2488 |
msgstr "" |
| 2489 |
|
| 2490 |
#. type: TP |
| 2491 |
#: debian-trixie |
| 2492 |
#, no-wrap |
| 2493 |
msgid "B<KEYCTL_INVALIDATE> (since Linux 3.5)" |
| 2494 |
msgstr "" |
| 2495 |
|
| 2496 |
#. commit fd75815f727f157a05f4c96b5294a4617c0557da |
| 2497 |
#. type: Plain text |
| 2498 |
#: debian-trixie |
| 2499 |
msgid "Mark a key as invalid." |
| 2500 |
msgstr "" |
| 2501 |
|
| 2502 |
#. type: Plain text |
| 2503 |
#: debian-trixie |
| 2504 |
msgid "" |
| 2505 |
"The ID of the key to be invalidated is specified in I<arg2> (cast to " |
| 2506 |
"I<key_serial_t>)." |
| 2507 |
msgstr "" |
| 2508 |
|
| 2509 |
#. CAP_SYS_ADMIN is permitted to invalidate certain special keys |
| 2510 |
#. type: Plain text |
| 2511 |
#: debian-trixie |
| 2512 |
msgid "" |
| 2513 |
"To invalidate a key, the caller must have I<search> permission on the key." |
| 2514 |
msgstr "" |
| 2515 |
|
| 2516 |
#. type: Plain text |
| 2517 |
#: debian-trixie |
| 2518 |
msgid "" |
| 2519 |
"This operation marks the key as invalid and schedules immediate garbage " |
| 2520 |
"collection. The garbage collector removes the invalidated key from all " |
| 2521 |
"keyrings and deletes the key when its reference count reaches zero. After " |
| 2522 |
"this operation, the key will be ignored by all searches, even if it is not " |
| 2523 |
"yet deleted." |
| 2524 |
msgstr "" |
| 2525 |
|
| 2526 |
#. type: Plain text |
| 2527 |
#: debian-trixie |
| 2528 |
msgid "" |
| 2529 |
"Keys that are marked invalid become invisible to normal key operations " |
| 2530 |
"immediately, though they are still visible in I</proc/keys> (marked with an " |
| 2531 |
"'i' flag) until they are actually removed." |
| 2532 |
msgstr "" |
| 2533 |
|
| 2534 |
#. type: Plain text |
| 2535 |
#: debian-trixie |
| 2536 |
msgid "" |
| 2537 |
"This operation is exposed by I<libkeyutils> via the function " |
| 2538 |
"B<keyctl_invalidate>(3)." |
| 2539 |
msgstr "" |
| 2540 |
|
| 2541 |
#. type: TP |
| 2542 |
#: debian-trixie |
| 2543 |
#, no-wrap |
| 2544 |
msgid "B<KEYCTL_GET_PERSISTENT> (since Linux 3.13)" |
| 2545 |
msgstr "" |
| 2546 |
|
| 2547 |
#. commit f36f8c75ae2e7d4da34f4c908cebdb4aa42c977e |
| 2548 |
#. type: Plain text |
| 2549 |
#: debian-trixie |
| 2550 |
msgid "" |
| 2551 |
"Get the persistent keyring (B<persistent-keyring>(7)) for a specified user " |
| 2552 |
"and link it to a specified keyring." |
| 2553 |
msgstr "" |
| 2554 |
|
| 2555 |
#. type: Plain text |
| 2556 |
#: debian-trixie |
| 2557 |
msgid "" |
| 2558 |
"The user ID is specified in I<arg2> (cast to I<uid_t>). If the value -1 is " |
| 2559 |
"specified, the caller's real user ID is used. The ID of the destination " |
| 2560 |
"keyring is specified in I<arg3> (cast to I<key_serial_t>)." |
| 2561 |
msgstr "" |
| 2562 |
|
| 2563 |
#. type: Plain text |
| 2564 |
#: debian-trixie |
| 2565 |
msgid "" |
| 2566 |
"The caller must have the B<CAP_SETUID> capability in its user namespace in " |
| 2567 |
"order to fetch the persistent keyring for a user ID that does not match " |
| 2568 |
"either the real or effective user ID of the caller." |
| 2569 |
msgstr "" |
| 2570 |
|
| 2571 |
#. type: Plain text |
| 2572 |
#: debian-trixie |
| 2573 |
msgid "" |
| 2574 |
"If the call is successful, a link to the persistent keyring is added to the " |
| 2575 |
"keyring whose ID was specified in I<arg3>." |
| 2576 |
msgstr "" |
| 2577 |
|
| 2578 |
#. type: Plain text |
| 2579 |
#: debian-trixie |
| 2580 |
msgid "" |
| 2581 |
"The persistent keyring will be created by the kernel if it does not yet " |
| 2582 |
"exist." |
| 2583 |
msgstr "" |
| 2584 |
|
| 2585 |
#. type: Plain text |
| 2586 |
#: debian-trixie |
| 2587 |
msgid "" |
| 2588 |
"Each time the B<KEYCTL_GET_PERSISTENT> operation is performed, the " |
| 2589 |
"persistent keyring will have its expiration timeout reset to the value in:" |
| 2590 |
msgstr "" |
| 2591 |
|
| 2592 |
#. type: Plain text |
| 2593 |
#: debian-trixie |
| 2594 |
#, no-wrap |
| 2595 |
msgid "/proc/sys/kernel/keys/persistent_keyring_expiry\n" |
| 2596 |
msgstr "" |
| 2597 |
|
| 2598 |
#. type: Plain text |
| 2599 |
#: debian-trixie |
| 2600 |
msgid "" |
| 2601 |
"Should the timeout be reached, the persistent keyring will be removed and " |
| 2602 |
"everything it pins can then be garbage collected." |
| 2603 |
msgstr "" |
| 2604 |
|
| 2605 |
#. type: Plain text |
| 2606 |
#: debian-trixie |
| 2607 |
msgid "Persistent keyrings were added in Linux 3.13." |
| 2608 |
msgstr "" |
| 2609 |
|
| 2610 |
#. type: Plain text |
| 2611 |
#: debian-trixie |
| 2612 |
msgid "" |
| 2613 |
"This operation is exposed by I<libkeyutils> via the function " |
| 2614 |
"B<keyctl_get_persistent>(3)." |
| 2615 |
msgstr "" |
| 2616 |
|
| 2617 |
#. type: TP |
| 2618 |
#: debian-trixie |
| 2619 |
#, no-wrap |
| 2620 |
msgid "B<KEYCTL_DH_COMPUTE> (since Linux 4.7)" |
| 2621 |
msgstr "" |
| 2622 |
|
| 2623 |
#. commit ddbb41148724367394d0880c516bfaeed127b52e |
| 2624 |
#. type: Plain text |
| 2625 |
#: debian-trixie |
| 2626 |
msgid "" |
| 2627 |
"Compute a Diffie-Hellman shared secret or public key, optionally applying " |
| 2628 |
"key derivation function (KDF) to the result." |
| 2629 |
msgstr "" |
| 2630 |
|
| 2631 |
#. type: Plain text |
| 2632 |
#: debian-trixie |
| 2633 |
msgid "" |
| 2634 |
"The I<arg2> argument is a pointer to a set of parameters containing serial " |
| 2635 |
"numbers for three I<\\[dq]user\\[dq]> keys used in the Diffie-Hellman " |
| 2636 |
"calculation, packaged in a structure of the following form:" |
| 2637 |
msgstr "" |
| 2638 |
|
| 2639 |
#. type: Plain text |
| 2640 |
#: debian-trixie |
| 2641 |
#, no-wrap |
| 2642 |
msgid "" |
| 2643 |
"struct keyctl_dh_params {\n" |
| 2644 |
" int32_t private; /* The local private key */\n" |
| 2645 |
" int32_t prime; /* The prime, known to both parties */\n" |
| 2646 |
" int32_t base; /* The base integer: either a shared\n" |
| 2647 |
" generator or the remote public key */\n" |
| 2648 |
"};\n" |
| 2649 |
msgstr "" |
| 2650 |
|
| 2651 |
#. type: Plain text |
| 2652 |
#: debian-trixie |
| 2653 |
msgid "" |
| 2654 |
"Each of the three keys specified in this structure must grant the caller " |
| 2655 |
"I<read> permission. The payloads of these keys are used to calculate the " |
| 2656 |
"Diffie-Hellman result as:" |
| 2657 |
msgstr "" |
| 2658 |
|
| 2659 |
#. type: Plain text |
| 2660 |
#: debian-trixie |
| 2661 |
#, no-wrap |
| 2662 |
msgid "base \\[ha] private mod prime\n" |
| 2663 |
msgstr "" |
| 2664 |
|
| 2665 |
#. type: Plain text |
| 2666 |
#: debian-trixie |
| 2667 |
msgid "" |
| 2668 |
"If the base is the shared generator, the result is the local public key. If " |
| 2669 |
"the base is the remote public key, the result is the shared secret." |
| 2670 |
msgstr "" |
| 2671 |
|
| 2672 |
#. type: Plain text |
| 2673 |
#: debian-trixie |
| 2674 |
msgid "" |
| 2675 |
"The I<arg3> argument (cast to I<char\\ *>) points to a buffer where the " |
| 2676 |
"result of the calculation is placed. The size of that buffer is specified " |
| 2677 |
"in I<arg4> (cast to I<size_t>)." |
| 2678 |
msgstr "" |
| 2679 |
|
| 2680 |
#. type: Plain text |
| 2681 |
#: debian-trixie |
| 2682 |
msgid "" |
| 2683 |
"The buffer must be large enough to accommodate the output data, otherwise an " |
| 2684 |
"error is returned. If I<arg4> is specified zero, in which case the buffer " |
| 2685 |
"is not used and the operation returns the minimum required buffer size " |
| 2686 |
"(i.e., the length of the prime)." |
| 2687 |
msgstr "" |
| 2688 |
|
| 2689 |
#. type: Plain text |
| 2690 |
#: debian-trixie |
| 2691 |
msgid "" |
| 2692 |
"Diffie-Hellman computations can be performed in user space, but require a " |
| 2693 |
"multiple-precision integer (MPI) library. Moving the implementation into " |
| 2694 |
"the kernel gives access to the kernel MPI implementation, and allows access " |
| 2695 |
"to secure or acceleration hardware." |
| 2696 |
msgstr "" |
| 2697 |
|
| 2698 |
#. commit f1c316a3ab9d24df6022682422fe897492f2c0c8 |
| 2699 |
#. type: Plain text |
| 2700 |
#: debian-trixie |
| 2701 |
msgid "" |
| 2702 |
"Adding support for DH computation to the B<keyctl>() system call was " |
| 2703 |
"considered a good fit due to the DH algorithm's use for deriving shared " |
| 2704 |
"keys; it also allows the type of the key to determine which DH " |
| 2705 |
"implementation (software or hardware) is appropriate." |
| 2706 |
msgstr "" |
| 2707 |
|
| 2708 |
#. type: Plain text |
| 2709 |
#: debian-trixie |
| 2710 |
msgid "" |
| 2711 |
"If the I<arg5> argument is B<NULL>, then the DH result itself is returned. " |
| 2712 |
"Otherwise (since Linux 4.12), it is a pointer to a structure which specifies " |
| 2713 |
"parameters of the KDF operation to be applied:" |
| 2714 |
msgstr "" |
| 2715 |
|
| 2716 |
#. type: Plain text |
| 2717 |
#: debian-trixie |
| 2718 |
#, no-wrap |
| 2719 |
msgid "" |
| 2720 |
"struct keyctl_kdf_params {\n" |
| 2721 |
" char *hashname; /* Hash algorithm name */\n" |
| 2722 |
" char *otherinfo; /* SP800-56A OtherInfo */\n" |
| 2723 |
" __u32 otherinfolen; /* Length of otherinfo data */\n" |
| 2724 |
" __u32 __spare[8]; /* Reserved */\n" |
| 2725 |
"};\n" |
| 2726 |
msgstr "" |
| 2727 |
|
| 2728 |
#. type: Plain text |
| 2729 |
#: debian-trixie |
| 2730 |
msgid "" |
| 2731 |
"The I<hashname> field is a null-terminated string which specifies a hash " |
| 2732 |
"name (available in the kernel's crypto API; the list of the hashes available " |
| 2733 |
"is rather tricky to observe; please refer to the E<.UR https://" |
| 2734 |
"www.kernel.org\\:/doc\\:/html\\:/latest\\:/crypto\\:/architecture.html> " |
| 2735 |
"\"Kernel Crypto API Architecture\" E<.UE> documentation for the information " |
| 2736 |
"regarding how hash names are constructed and your kernel's source and " |
| 2737 |
"configuration regarding what ciphers and templates with type " |
| 2738 |
"B<CRYPTO_ALG_TYPE_SHASH> are available) to be applied to DH result in KDF " |
| 2739 |
"operation." |
| 2740 |
msgstr "" |
| 2741 |
|
| 2742 |
#. type: Plain text |
| 2743 |
#: debian-trixie |
| 2744 |
msgid "" |
| 2745 |
"The I<otherinfo> field is an I<OtherInfo> data as described in SP800-56A " |
| 2746 |
"section 5.8.1.2 and is algorithm-specific. This data is concatenated with " |
| 2747 |
"the result of DH operation and is provided as an input to the KDF " |
| 2748 |
"operation. Its size is provided in the I<otherinfolen> field and is limited " |
| 2749 |
"by B<KEYCTL_KDF_MAX_OI_LEN> constant that defined in I<security/keys/" |
| 2750 |
"internal.h> to a value of 64." |
| 2751 |
msgstr "" |
| 2752 |
|
| 2753 |
#. commit 4f9dabfaf8df971f8a3b6aa324f8f817be38d538 |
| 2754 |
#. type: Plain text |
| 2755 |
#: debian-trixie |
| 2756 |
msgid "" |
| 2757 |
"The B<__spare> field is currently unused. It was ignored until Linux 4.13 " |
| 2758 |
"(but still should be user-addressable since it is copied to the kernel), and " |
| 2759 |
"should contain zeros since Linux 4.13." |
| 2760 |
msgstr "" |
| 2761 |
|
| 2762 |
#. type: Plain text |
| 2763 |
#: debian-trixie |
| 2764 |
msgid "" |
| 2765 |
"The KDF implementation complies with SP800-56A as well as with SP800-108 " |
| 2766 |
"(the counter KDF)." |
| 2767 |
msgstr "" |
| 2768 |
|
| 2769 |
#. keyutils commit 742c9d7b94051d3b21f9f61a73ed6b5f3544cb82 |
| 2770 |
#. keyutils commit d68a981e5db41d059ac782071c35d1e8f3aaf61c |
| 2771 |
#. type: Plain text |
| 2772 |
#: debian-trixie |
| 2773 |
msgid "" |
| 2774 |
"This operation is exposed by I<libkeyutils> (from I<libkeyutils> 1.5.10 " |
| 2775 |
"onwards) via the functions B<keyctl_dh_compute>(3) and " |
| 2776 |
"B<keyctl_dh_compute_alloc>(3)." |
| 2777 |
msgstr "" |
| 2778 |
|
| 2779 |
#. type: TP |
| 2780 |
#: debian-trixie |
| 2781 |
#, no-wrap |
| 2782 |
msgid "B<KEYCTL_RESTRICT_KEYRING> (since Linux 4.12)" |
| 2783 |
msgstr "" |
| 2784 |
|
| 2785 |
#. commit 6563c91fd645556c7801748f15bc727c77fcd311 |
| 2786 |
#. commit 7228b66aaf723a623e578aa4db7d083bb39546c9 |
| 2787 |
#. type: Plain text |
| 2788 |
#: debian-trixie |
| 2789 |
msgid "" |
| 2790 |
"Apply a key-linking restriction to the keyring with the ID provided in " |
| 2791 |
"I<arg2> (cast to I<key_serial_t>). The caller must have I<setattr> " |
| 2792 |
"permission on the key. If I<arg3> is NULL, any attempt to add a key to the " |
| 2793 |
"keyring is blocked; otherwise it contains a pointer to a string with a key " |
| 2794 |
"type name and I<arg4> contains a pointer to string that describes the type-" |
| 2795 |
"specific restriction. As of Linux 4.12, only the type \"asymmetric\" has " |
| 2796 |
"restrictions defined:" |
| 2797 |
msgstr "" |
| 2798 |
|
| 2799 |
#. type: TP |
| 2800 |
#: debian-trixie |
| 2801 |
#, no-wrap |
| 2802 |
msgid "B<builtin_trusted>" |
| 2803 |
msgstr "" |
| 2804 |
|
| 2805 |
#. type: Plain text |
| 2806 |
#: debian-trixie |
| 2807 |
msgid "" |
| 2808 |
"Allows only keys that are signed by a key linked to the built-in keyring " |
| 2809 |
"(\".builtin_trusted_keys\")." |
| 2810 |
msgstr "" |
| 2811 |
|
| 2812 |
#. type: TP |
| 2813 |
#: debian-trixie |
| 2814 |
#, no-wrap |
| 2815 |
msgid "B<builtin_and_secondary_trusted>" |
| 2816 |
msgstr "" |
| 2817 |
|
| 2818 |
#. type: Plain text |
| 2819 |
#: debian-trixie |
| 2820 |
msgid "" |
| 2821 |
"Allows only keys that are signed by a key linked to the secondary keyring " |
| 2822 |
"(\".secondary_trusted_keys\") or, by extension, a key in a built-in keyring, " |
| 2823 |
"as the latter is linked to the former." |
| 2824 |
msgstr "" |
| 2825 |
|
| 2826 |
#. type: TP |
| 2827 |
#: debian-trixie |
| 2828 |
#, no-wrap |
| 2829 |
msgid "B<key_or_keyring:>I<key>" |
| 2830 |
msgstr "" |
| 2831 |
|
| 2832 |
#. type: TQ |
| 2833 |
#: debian-trixie |
| 2834 |
#, no-wrap |
| 2835 |
msgid "B<key_or_keyring:>I<key>B<:chain>" |
| 2836 |
msgstr "" |
| 2837 |
|
| 2838 |
#. type: Plain text |
| 2839 |
#: debian-trixie |
| 2840 |
msgid "" |
| 2841 |
"If I<key> specifies the ID of a key of type \"asymmetric\", then only keys " |
| 2842 |
"that are signed by this key are allowed." |
| 2843 |
msgstr "" |
| 2844 |
|
| 2845 |
#. type: Plain text |
| 2846 |
#: debian-trixie |
| 2847 |
msgid "" |
| 2848 |
"If I<key> specifies the ID of a keyring, then only keys that are signed by a " |
| 2849 |
"key linked to this keyring are allowed." |
| 2850 |
msgstr "" |
| 2851 |
|
| 2852 |
#. type: Plain text |
| 2853 |
#: debian-trixie |
| 2854 |
msgid "" |
| 2855 |
"If \":chain\" is specified, keys that are signed by a keys linked to the " |
| 2856 |
"destination keyring (that is, the keyring with the ID specified in the " |
| 2857 |
"I<arg2> argument) are also allowed." |
| 2858 |
msgstr "" |
| 2859 |
|
| 2860 |
#. type: Plain text |
| 2861 |
#: debian-trixie |
| 2862 |
msgid "" |
| 2863 |
"Note that a restriction can be configured only once for the specified " |
| 2864 |
"keyring; once a restriction is set, it can't be overridden." |
| 2865 |
msgstr "" |
| 2866 |
|
| 2867 |
#. FIXME Document KEYCTL_RESTRICT_KEYRING, added in Linux 4.12 |
| 2868 |
#. commit 6563c91fd645556c7801748f15bc727c77fcd311 |
| 2869 |
#. Author: Mat Martineau <[email protected]> |
| 2870 |
#. See Documentation/security/keys.txt |
| 2871 |
#. type: Plain text |
| 2872 |
#: debian-trixie |
| 2873 |
msgid "The argument I<arg5> is ignored." |
| 2874 |
msgstr "" |
| 2875 |
|
| 2876 |
#. type: Plain text |
| 2877 |
#: debian-trixie |
| 2878 |
msgid "For a successful call, the return value depends on the operation:" |
| 2879 |
msgstr "" |
| 2880 |
|
| 2881 |
#. type: TP |
| 2882 |
#: debian-trixie |
| 2883 |
#, no-wrap |
| 2884 |
msgid "B<KEYCTL_GET_KEYRING_ID>" |
| 2885 |
msgstr "" |
| 2886 |
|
| 2887 |
#. type: Plain text |
| 2888 |
#: debian-trixie |
| 2889 |
msgid "The ID of the requested keyring." |
| 2890 |
msgstr "" |
| 2891 |
|
| 2892 |
#. type: TP |
| 2893 |
#: debian-trixie |
| 2894 |
#, no-wrap |
| 2895 |
msgid "B<KEYCTL_JOIN_SESSION_KEYRING>" |
| 2896 |
msgstr "" |
| 2897 |
|
| 2898 |
#. type: Plain text |
| 2899 |
#: debian-trixie |
| 2900 |
msgid "The ID of the joined session keyring." |
| 2901 |
msgstr "" |
| 2902 |
|
| 2903 |
#. type: TP |
| 2904 |
#: debian-trixie |
| 2905 |
#, no-wrap |
| 2906 |
msgid "B<KEYCTL_DESCRIBE>" |
| 2907 |
msgstr "" |
| 2908 |
|
| 2909 |
#. type: Plain text |
| 2910 |
#: debian-trixie |
| 2911 |
msgid "" |
| 2912 |
"The size of the description (including the terminating null byte), " |
| 2913 |
"irrespective of the provided buffer size." |
| 2914 |
msgstr "" |
| 2915 |
|
| 2916 |
#. type: TP |
| 2917 |
#: debian-trixie |
| 2918 |
#, no-wrap |
| 2919 |
msgid "B<KEYCTL_SEARCH>" |
| 2920 |
msgstr "" |
| 2921 |
|
| 2922 |
#. type: Plain text |
| 2923 |
#: debian-trixie |
| 2924 |
msgid "The ID of the key that was found." |
| 2925 |
msgstr "" |
| 2926 |
|
| 2927 |
#. type: TP |
| 2928 |
#: debian-trixie |
| 2929 |
#, no-wrap |
| 2930 |
msgid "B<KEYCTL_READ>" |
| 2931 |
msgstr "" |
| 2932 |
|
| 2933 |
#. type: Plain text |
| 2934 |
#: debian-trixie |
| 2935 |
msgid "" |
| 2936 |
"The amount of data that is available in the key, irrespective of the " |
| 2937 |
"provided buffer size." |
| 2938 |
msgstr "" |
| 2939 |
|
| 2940 |
#. type: TP |
| 2941 |
#: debian-trixie |
| 2942 |
#, no-wrap |
| 2943 |
msgid "B<KEYCTL_SET_REQKEY_KEYRING>" |
| 2944 |
msgstr "" |
| 2945 |
|
| 2946 |
#. type: Plain text |
| 2947 |
#: debian-trixie |
| 2948 |
msgid "" |
| 2949 |
"The ID of the previous default keyring to which implicitly requested keys " |
| 2950 |
"were linked (one of B<KEY_REQKEY_DEFL_USER_*>)." |
| 2951 |
msgstr "" |
| 2952 |
|
| 2953 |
#. type: TP |
| 2954 |
#: debian-trixie |
| 2955 |
#, no-wrap |
| 2956 |
msgid "B<KEYCTL_ASSUME_AUTHORITY>" |
| 2957 |
msgstr "" |
| 2958 |
|
| 2959 |
#. type: Plain text |
| 2960 |
#: debian-trixie |
| 2961 |
msgid "" |
| 2962 |
"Either 0, if the ID given was 0, or the ID of the authorization key matching " |
| 2963 |
"the specified key, if a nonzero key ID was provided." |
| 2964 |
msgstr "" |
| 2965 |
|
| 2966 |
#. type: TP |
| 2967 |
#: debian-trixie |
| 2968 |
#, no-wrap |
| 2969 |
msgid "B<KEYCTL_GET_SECURITY>" |
| 2970 |
msgstr "" |
| 2971 |
|
| 2972 |
#. type: Plain text |
| 2973 |
#: debian-trixie |
| 2974 |
msgid "" |
| 2975 |
"The size of the LSM security label string (including the terminating null " |
| 2976 |
"byte), irrespective of the provided buffer size." |
| 2977 |
msgstr "" |
| 2978 |
|
| 2979 |
#. type: TP |
| 2980 |
#: debian-trixie |
| 2981 |
#, no-wrap |
| 2982 |
msgid "B<KEYCTL_GET_PERSISTENT>" |
| 2983 |
msgstr "" |
| 2984 |
|
| 2985 |
#. type: Plain text |
| 2986 |
#: debian-trixie |
| 2987 |
msgid "The ID of the persistent keyring." |
| 2988 |
msgstr "" |
| 2989 |
|
| 2990 |
#. type: TP |
| 2991 |
#: debian-trixie |
| 2992 |
#, no-wrap |
| 2993 |
msgid "B<KEYCTL_DH_COMPUTE>" |
| 2994 |
msgstr "" |
| 2995 |
|
| 2996 |
#. type: Plain text |
| 2997 |
#: debian-trixie |
| 2998 |
msgid "" |
| 2999 |
"The number of bytes copied to the buffer, or, if I<arg4> is 0, the required " |
| 3000 |
"buffer size." |
| 3001 |
msgstr "" |
| 3002 |
|
| 3003 |
#. type: TP |
| 3004 |
#: debian-trixie |
| 3005 |
#, no-wrap |
| 3006 |
msgid "All other operations" |
| 3007 |
msgstr "" |
| 3008 |
|
| 3009 |
#. type: Plain text |
| 3010 |
#: debian-trixie |
| 3011 |
msgid "Zero." |
| 3012 |
msgstr "" |
| 3013 |
|
| 3014 |
#. type: TP |
| 3015 |
#: debian-trixie |
| 3016 |
#, no-wrap |
| 3017 |
msgid "B<EAGAIN>" |
| 3018 |
msgstr "" |
| 3019 |
|
| 3020 |
#. type: Plain text |
| 3021 |
#: debian-trixie |
| 3022 |
msgid "" |
| 3023 |
"I<operation> was B<KEYCTL_DH_COMPUTE> and there was an error during crypto " |
| 3024 |
"module initialization." |
| 3025 |
msgstr "" |
| 3026 |
|
| 3027 |
#. type: TP |
| 3028 |
#: debian-trixie |
| 3029 |
#, no-wrap |
| 3030 |
msgid "B<EDEADLK>" |
| 3031 |
msgstr "" |
| 3032 |
|
| 3033 |
#. type: Plain text |
| 3034 |
#: debian-trixie |
| 3035 |
msgid "" |
| 3036 |
"I<operation> was B<KEYCTL_LINK> and the requested link would result in a " |
| 3037 |
"cycle." |
| 3038 |
msgstr "" |
| 3039 |
|
| 3040 |
#. type: Plain text |
| 3041 |
#: debian-trixie |
| 3042 |
msgid "" |
| 3043 |
"I<operation> was B<KEYCTL_RESTRICT_KEYRING> and the requested keyring " |
| 3044 |
"restriction would result in a cycle." |
| 3045 |
msgstr "" |
| 3046 |
|
| 3047 |
#. type: TP |
| 3048 |
#: debian-trixie |
| 3049 |
#, no-wrap |
| 3050 |
msgid "B<EEXIST>" |
| 3051 |
msgstr "" |
| 3052 |
|
| 3053 |
#. type: Plain text |
| 3054 |
#: debian-trixie |
| 3055 |
msgid "" |
| 3056 |
"I<operation> was B<KEYCTL_RESTRICT_KEYRING> and keyring provided in I<arg2> " |
| 3057 |
"argument already has a restriction set." |
| 3058 |
msgstr "" |
| 3059 |
|
| 3060 |
#. type: TP |
| 3061 |
#: debian-trixie |
| 3062 |
#, no-wrap |
| 3063 |
msgid "B<EFAULT>" |
| 3064 |
msgstr "" |
| 3065 |
|
| 3066 |
#. type: Plain text |
| 3067 |
#: debian-trixie |
| 3068 |
msgid "" |
| 3069 |
"I<operation> was B<KEYCTL_DH_COMPUTE> and one of the following has failed:" |
| 3070 |
msgstr "" |
| 3071 |
|
| 3072 |
#. type: Plain text |
| 3073 |
#: debian-trixie |
| 3074 |
msgid "" |
| 3075 |
"copying of the I<struct keyctl_dh_params>, provided in the I<arg2> argument, " |
| 3076 |
"from user space;" |
| 3077 |
msgstr "" |
| 3078 |
|
| 3079 |
#. type: Plain text |
| 3080 |
#: debian-trixie |
| 3081 |
msgid "" |
| 3082 |
"copying of the I<struct keyctl_kdf_params>, provided in the non-NULL I<arg5> " |
| 3083 |
"argument, from user space (in case kernel supports performing KDF operation " |
| 3084 |
"on DH operation result);" |
| 3085 |
msgstr "" |
| 3086 |
|
| 3087 |
#. type: Plain text |
| 3088 |
#: debian-trixie |
| 3089 |
msgid "" |
| 3090 |
"copying of data pointed by the I<hashname> field of the I<struct " |
| 3091 |
"keyctl_kdf_params> from user space;" |
| 3092 |
msgstr "" |
| 3093 |
|
| 3094 |
#. type: Plain text |
| 3095 |
#: debian-trixie |
| 3096 |
msgid "" |
| 3097 |
"copying of data pointed by the I<otherinfo> field of the I<struct " |
| 3098 |
"keyctl_kdf_params> from user space if the I<otherinfolen> field was nonzero;" |
| 3099 |
msgstr "" |
| 3100 |
|
| 3101 |
#. type: Plain text |
| 3102 |
#: debian-trixie |
| 3103 |
msgid "copying of the result to user space." |
| 3104 |
msgstr "" |
| 3105 |
|
| 3106 |
#. type: Plain text |
| 3107 |
#: debian-trixie |
| 3108 |
msgid "" |
| 3109 |
"I<operation> was B<KEYCTL_SETPERM> and an invalid permission bit was " |
| 3110 |
"specified in I<arg3>." |
| 3111 |
msgstr "" |
| 3112 |
|
| 3113 |
#. type: Plain text |
| 3114 |
#: debian-trixie |
| 3115 |
msgid "" |
| 3116 |
"I<operation> was B<KEYCTL_SEARCH> and the size of the description in I<arg4> " |
| 3117 |
"(including the terminating null byte) exceeded 4096 bytes." |
| 3118 |
msgstr "" |
| 3119 |
|
| 3120 |
#. type: TP |
| 3121 |
#: debian-trixie |
| 3122 |
#, no-wrap |
| 3123 |
msgid "B<EINVAL> (before Linux 4.12)" |
| 3124 |
msgstr "" |
| 3125 |
|
| 3126 |
#. type: Plain text |
| 3127 |
#: debian-trixie |
| 3128 |
msgid "I<operation> was B<KEYCTL_DH_COMPUTE>, argument I<arg5> was non-NULL." |
| 3129 |
msgstr "" |
| 3130 |
|
| 3131 |
#. type: Plain text |
| 3132 |
#: debian-trixie |
| 3133 |
msgid "" |
| 3134 |
"I<operation> was B<KEYCTL_DH_COMPUTE> And the digest size of the hashing " |
| 3135 |
"algorithm supplied is zero." |
| 3136 |
msgstr "" |
| 3137 |
|
| 3138 |
#. type: Plain text |
| 3139 |
#: debian-trixie |
| 3140 |
msgid "" |
| 3141 |
"I<operation> was B<KEYCTL_DH_COMPUTE> and the buffer size provided is not " |
| 3142 |
"enough to hold the result. Provide 0 as a buffer size in order to obtain " |
| 3143 |
"the minimum buffer size." |
| 3144 |
msgstr "" |
| 3145 |
|
| 3146 |
#. type: Plain text |
| 3147 |
#: debian-trixie |
| 3148 |
msgid "" |
| 3149 |
"I<operation> was B<KEYCTL_DH_COMPUTE> and the hash name provided in the " |
| 3150 |
"I<hashname> field of the I<struct keyctl_kdf_params> pointed by I<arg5> " |
| 3151 |
"argument is too big (the limit is implementation-specific and varies between " |
| 3152 |
"kernel versions, but it is deemed big enough for all valid algorithm names)." |
| 3153 |
msgstr "" |
| 3154 |
|
| 3155 |
#. commit 4f9dabfaf8df971f8a3b6aa324f8f817be38d538 |
| 3156 |
#. type: Plain text |
| 3157 |
#: debian-trixie |
| 3158 |
msgid "" |
| 3159 |
"I<operation> was B<KEYCTL_DH_COMPUTE> and the I<__spare> field of the " |
| 3160 |
"I<struct keyctl_kdf_params> provided in the I<arg5> argument contains " |
| 3161 |
"nonzero values." |
| 3162 |
msgstr "" |
| 3163 |
|
| 3164 |
#. type: TP |
| 3165 |
#: debian-trixie |
| 3166 |
#, no-wrap |
| 3167 |
msgid "B<ELOOP>" |
| 3168 |
msgstr "" |
| 3169 |
|
| 3170 |
#. type: Plain text |
| 3171 |
#: debian-trixie |
| 3172 |
msgid "" |
| 3173 |
"I<operation> was B<KEYCTL_LINK> and the requested link would cause the " |
| 3174 |
"maximum nesting depth for keyrings to be exceeded." |
| 3175 |
msgstr "" |
| 3176 |
|
| 3177 |
#. type: TP |
| 3178 |
#: debian-trixie |
| 3179 |
#, no-wrap |
| 3180 |
msgid "B<EMSGSIZE>" |
| 3181 |
msgstr "" |
| 3182 |
|
| 3183 |
#. type: Plain text |
| 3184 |
#: debian-trixie |
| 3185 |
msgid "" |
| 3186 |
"I<operation> was B<KEYCTL_DH_COMPUTE> and the buffer length exceeds " |
| 3187 |
"B<KEYCTL_KDF_MAX_OUTPUT_LEN> (which is 1024 currently) or the " |
| 3188 |
"I<otherinfolen> field of the I<struct keyctl_kdf_parms> passed in I<arg5> " |
| 3189 |
"exceeds B<KEYCTL_KDF_MAX_OI_LEN> (which is 64 currently)." |
| 3190 |
msgstr "" |
| 3191 |
|
| 3192 |
#. type: TP |
| 3193 |
#: debian-trixie |
| 3194 |
#, no-wrap |
| 3195 |
msgid "B<ENFILE> (before Linux 3.13)" |
| 3196 |
msgstr "" |
| 3197 |
|
| 3198 |
#. commit b2a4df200d570b2c33a57e1ebfa5896e4bc81b69 |
| 3199 |
#. type: Plain text |
| 3200 |
#: debian-trixie |
| 3201 |
msgid "" |
| 3202 |
"I<operation> was B<KEYCTL_LINK> and the keyring is full. (Before Linux " |
| 3203 |
"3.13, the available space for storing keyring links was limited to a single " |
| 3204 |
"page of memory; since Linux 3.13, there is no fixed limit.)" |
| 3205 |
msgstr "" |
| 3206 |
|
| 3207 |
#. type: TP |
| 3208 |
#: debian-trixie |
| 3209 |
#, no-wrap |
| 3210 |
msgid "B<ENOENT>" |
| 3211 |
msgstr "" |
| 3212 |
|
| 3213 |
#. type: Plain text |
| 3214 |
#: debian-trixie |
| 3215 |
msgid "" |
| 3216 |
"I<operation> was B<KEYCTL_UNLINK> and the key to be unlinked isn't linked to " |
| 3217 |
"the keyring." |
| 3218 |
msgstr "" |
| 3219 |
|
| 3220 |
#. type: Plain text |
| 3221 |
#: debian-trixie |
| 3222 |
msgid "" |
| 3223 |
"I<operation> was B<KEYCTL_DH_COMPUTE> and the hashing algorithm specified in " |
| 3224 |
"the I<hashname> field of the I<struct keyctl_kdf_params> pointed by I<arg5> " |
| 3225 |
"argument hasn't been found." |
| 3226 |
msgstr "" |
| 3227 |
|
| 3228 |
#. type: Plain text |
| 3229 |
#: debian-trixie |
| 3230 |
msgid "" |
| 3231 |
"I<operation> was B<KEYCTL_RESTRICT_KEYRING> and the type provided in I<arg3> " |
| 3232 |
"argument doesn't support setting key linking restrictions." |
| 3233 |
msgstr "" |
| 3234 |
|
| 3235 |
#. type: Plain text |
| 3236 |
#: debian-trixie |
| 3237 |
msgid "" |
| 3238 |
"The value B<KEYCTL_GET_KEYRING_ID> was specified in I<operation>, the key " |
| 3239 |
"specified in I<arg2> did not exist, and I<arg3> was zero (meaning don't " |
| 3240 |
"create the key if it didn't exist)." |
| 3241 |
msgstr "" |
| 3242 |
|
| 3243 |
#. type: TP |
| 3244 |
#: debian-trixie |
| 3245 |
#, no-wrap |
| 3246 |
msgid "B<EOPNOTSUPP>" |
| 3247 |
msgstr "" |
| 3248 |
|
| 3249 |
#. type: Plain text |
| 3250 |
#: debian-trixie |
| 3251 |
msgid "" |
| 3252 |
"I<operation> was B<KEYCTL_READ> and the key type does not support reading " |
| 3253 |
"(e.g., the type is I<\\[dq]login\\[dq]>)." |
| 3254 |
msgstr "" |
| 3255 |
|
| 3256 |
#. type: Plain text |
| 3257 |
#: debian-trixie |
| 3258 |
msgid "" |
| 3259 |
"I<operation> was B<KEYCTL_UPDATE> and the key type does not support updating." |
| 3260 |
msgstr "" |
| 3261 |
|
| 3262 |
#. type: Plain text |
| 3263 |
#: debian-trixie |
| 3264 |
msgid "" |
| 3265 |
"I<operation> was B<KEYCTL_RESTRICT_KEYRING>, the type provided in I<arg3> " |
| 3266 |
"argument was \"asymmetric\", and the key specified in the restriction " |
| 3267 |
"specification provided in I<arg4> has type other than \"asymmetric\" or " |
| 3268 |
"\"keyring\"." |
| 3269 |
msgstr "" |
| 3270 |
|
| 3271 |
#. type: TP |
| 3272 |
#: debian-trixie |
| 3273 |
#, no-wrap |
| 3274 |
msgid "B<EPERM>" |
| 3275 |
msgstr "" |
| 3276 |
|
| 3277 |
#. type: Plain text |
| 3278 |
#: debian-trixie |
| 3279 |
msgid "" |
| 3280 |
"I<operation> was B<KEYCTL_GET_PERSISTENT>, I<arg2> specified a UID other " |
| 3281 |
"than the calling thread's real or effective UID, and the caller did not have " |
| 3282 |
"the B<CAP_SETUID> capability." |
| 3283 |
msgstr "" |
| 3284 |
|
| 3285 |
#. type: Plain text |
| 3286 |
#: debian-trixie |
| 3287 |
msgid "" |
| 3288 |
"I<operation> was B<KEYCTL_SESSION_TO_PARENT> and either: all of the UIDs " |
| 3289 |
"(GIDs) of the parent process do not match the effective UID (GID) of the " |
| 3290 |
"calling process; the UID of the parent's existing session keyring or the UID " |
| 3291 |
"of the caller's session keyring did not match the effective UID of the " |
| 3292 |
"caller; the parent process is not single-thread; or the parent process is " |
| 3293 |
"B<init>(1) or a kernel thread." |
| 3294 |
msgstr "" |
| 3295 |
|
| 3296 |
#. type: TP |
| 3297 |
#: debian-trixie |
| 3298 |
#, no-wrap |
| 3299 |
msgid "B<ETIMEDOUT>" |
| 3300 |
msgstr "" |
| 3301 |
|
| 3302 |
#. type: Plain text |
| 3303 |
#: debian-trixie |
| 3304 |
msgid "" |
| 3305 |
"I<operation> was B<KEYCTL_DH_COMPUTE> and the initialization of crypto " |
| 3306 |
"modules has timed out." |
| 3307 |
msgstr "" |
| 3308 |
|
| 3309 |
#. type: Plain text |
| 3310 |
#: debian-trixie fedora-44 fedora-rawhide |
| 3311 |
#, no-wrap |
| 3312 |
msgid "" |
| 3313 |
"$ B<cc -o key_instantiate key_instantiate.c -lkeyutils>\n" |
| 3314 |
"$ B<sudo mv /sbin/request-key /sbin/request-key.backup>\n" |
| 3315 |
"$ B<sudo cp key_instantiate /sbin/request-key>\n" |
| 3316 |
"$ B<./t_request_key user mykey somepayloaddata>\n" |
| 3317 |
"Key ID is 20d035bf\n" |
| 3318 |
"$ B<sudo mv /sbin/request-key.backup /sbin/request-key>\n" |
| 3319 |
msgstr "" |
| 3320 |
|
| 3321 |
#. type: Plain text |
| 3322 |
#: debian-trixie fedora-44 fedora-rawhide |
| 3323 |
#, no-wrap |
| 3324 |
msgid "" |
| 3325 |
"$ B<cat /tmp/key_instantiate.log>\n" |
| 3326 |
"Time: Mon Nov 7 13:06:47 2016\n" |
| 3327 |
"\\&\n" |
| 3328 |
"Command line arguments:\n" |
| 3329 |
" argv[0]: /sbin/request-key\n" |
| 3330 |
" operation: create\n" |
| 3331 |
" key_to_instantiate: 20d035bf\n" |
| 3332 |
" UID: 1000\n" |
| 3333 |
" GID: 1000\n" |
| 3334 |
" thread_keyring: 0\n" |
| 3335 |
" process_keyring: 0\n" |
| 3336 |
" session_keyring: 256e6a6\n" |
| 3337 |
"\\&\n" |
| 3338 |
"Key description: user;1000;1000;3f010000;mykey\n" |
| 3339 |
"Auth key payload: somepayloaddata\n" |
| 3340 |
"Destination keyring: 256e6a6\n" |
| 3341 |
"Auth key description: .request_key_auth;1000;1000;0b010000;20d035bf\n" |
| 3342 |
msgstr "" |
| 3343 |
|
| 3344 |
#. type: Plain text |
| 3345 |
#: debian-trixie fedora-44 fedora-rawhide |
| 3346 |
#, no-wrap |
| 3347 |
msgid "" |
| 3348 |
"$ B<cat /proc/keys | egrep \\[aq]mykey|256e6a6\\[aq]>\n" |
| 3349 |
"0256e6a6 I--Q--- 194 perm 3f030000 1000 1000 keyring _ses: 3\n" |
| 3350 |
"20d035bf I--Q--- 1 perm 3f010000 1000 1000 user mykey: 16\n" |
| 3351 |
msgstr "" |
| 3352 |
|
| 3353 |
#. type: Plain text |
| 3354 |
#: debian-trixie fedora-44 fedora-rawhide |
| 3355 |
#, no-wrap |
| 3356 |
msgid "" |
| 3357 |
"/* key_instantiate.c */\n" |
| 3358 |
"\\&\n" |
| 3359 |
"#include E<lt>errno.hE<gt>\n" |
| 3360 |
"#include E<lt>keyutils.hE<gt>\n" |
| 3361 |
"#include E<lt>stdint.hE<gt>\n" |
| 3362 |
"#include E<lt>stdio.hE<gt>\n" |
| 3363 |
"#include E<lt>stdlib.hE<gt>\n" |
| 3364 |
"#include E<lt>string.hE<gt>\n" |
| 3365 |
"#include E<lt>sys/types.hE<gt>\n" |
| 3366 |
"#include E<lt>time.hE<gt>\n" |
| 3367 |
"\\&\n" |
| 3368 |
"#ifndef KEY_SPEC_REQUESTOR_KEYRING\n" |
| 3369 |
"#define KEY_SPEC_REQUESTOR_KEYRING (-8)\n" |
| 3370 |
"#endif\n" |
| 3371 |
"\\&\n" |
| 3372 |
"int\n" |
| 3373 |
"main(int argc, char *argv[])\n" |
| 3374 |
"{\n" |
| 3375 |
" int akp_size; /* Size of auth_key_payload */\n" |
| 3376 |
" int auth_key;\n" |
| 3377 |
" char dbuf[256];\n" |
| 3378 |
" char auth_key_payload[256];\n" |
| 3379 |
" char *operation;\n" |
| 3380 |
" FILE *fp;\n" |
| 3381 |
" gid_t gid;\n" |
| 3382 |
" uid_t uid;\n" |
| 3383 |
" time_t t;\n" |
| 3384 |
" key_serial_t key_to_instantiate, dest_keyring;\n" |
| 3385 |
" key_serial_t thread_keyring, process_keyring, session_keyring;\n" |
| 3386 |
"\\&\n" |
| 3387 |
" if (argc != 8) {\n" |
| 3388 |
" fprintf(stderr, \"Usage: %s op key uid gid thread_keyring \"\n" |
| 3389 |
" \"process_keyring session_keyring\\[rs]n\", argv[0]);\n" |
| 3390 |
" exit(EXIT_FAILURE);\n" |
| 3391 |
" }\n" |
| 3392 |
"\\&\n" |
| 3393 |
" fp = fopen(\"/tmp/key_instantiate.log\", \"w\");\n" |
| 3394 |
" if (fp == NULL)\n" |
| 3395 |
" exit(EXIT_FAILURE);\n" |
| 3396 |
"\\&\n" |
| 3397 |
" setbuf(fp, NULL);\n" |
| 3398 |
"\\&\n" |
| 3399 |
" t = time(NULL);\n" |
| 3400 |
" fprintf(fp, \"Time: %s\\[rs]n\", ctime(&t));\n" |
| 3401 |
"\\&\n" |
| 3402 |
" /*\n" |
| 3403 |
" * The kernel passes a fixed set of arguments to the program\n" |
| 3404 |
" * that it execs; fetch them.\n" |
| 3405 |
" */\n" |
| 3406 |
" operation = argv[1];\n" |
| 3407 |
" key_to_instantiate = atoi(argv[2]);\n" |
| 3408 |
" uid = atoi(argv[3]);\n" |
| 3409 |
" gid = atoi(argv[4]);\n" |
| 3410 |
" thread_keyring = atoi(argv[5]);\n" |
| 3411 |
" process_keyring = atoi(argv[6]);\n" |
| 3412 |
" session_keyring = atoi(argv[7]);\n" |
| 3413 |
"\\&\n" |
| 3414 |
" fprintf(fp, \"Command line arguments:\\[rs]n\");\n" |
| 3415 |
" fprintf(fp, \" argv[0]: %s\\[rs]n\", argv[0]);\n" |
| 3416 |
" fprintf(fp, \" operation: %s\\[rs]n\", operation);\n" |
| 3417 |
" fprintf(fp, \" key_to_instantiate: %jx\\[rs]n\",\n" |
| 3418 |
" (uintmax_t) key_to_instantiate);\n" |
| 3419 |
" fprintf(fp, \" UID: %jd\\[rs]n\", (intmax_t) uid);\n" |
| 3420 |
" fprintf(fp, \" GID: %jd\\[rs]n\", (intmax_t) gid);\n" |
| 3421 |
" fprintf(fp, \" thread_keyring: %jx\\[rs]n\",\n" |
| 3422 |
" (uintmax_t) thread_keyring);\n" |
| 3423 |
" fprintf(fp, \" process_keyring: %jx\\[rs]n\",\n" |
| 3424 |
" (uintmax_t) process_keyring);\n" |
| 3425 |
" fprintf(fp, \" session_keyring: %jx\\[rs]n\",\n" |
| 3426 |
" (uintmax_t) session_keyring);\n" |
| 3427 |
" fprintf(fp, \"\\[rs]n\");\n" |
| 3428 |
"\\&\n" |
| 3429 |
" /*\n" |
| 3430 |
" * Assume the authority to instantiate the key named in argv[2].\n" |
| 3431 |
" */\n" |
| 3432 |
" if (keyctl(KEYCTL_ASSUME_AUTHORITY, key_to_instantiate) == -1) {\n" |
| 3433 |
" fprintf(fp, \"KEYCTL_ASSUME_AUTHORITY failed: %s\\[rs]n\",\n" |
| 3434 |
" strerror(errno));\n" |
| 3435 |
" exit(EXIT_FAILURE);\n" |
| 3436 |
" }\n" |
| 3437 |
"\\&\n" |
| 3438 |
" /*\n" |
| 3439 |
" * Fetch the description of the key that is to be instantiated.\n" |
| 3440 |
" */\n" |
| 3441 |
" if (keyctl(KEYCTL_DESCRIBE, key_to_instantiate,\n" |
| 3442 |
" dbuf, sizeof(dbuf)) == -1) {\n" |
| 3443 |
" fprintf(fp, \"KEYCTL_DESCRIBE failed: %s\\[rs]n\", strerror(errno));\n" |
| 3444 |
" exit(EXIT_FAILURE);\n" |
| 3445 |
" }\n" |
| 3446 |
"\\&\n" |
| 3447 |
" fprintf(fp, \"Key description: %s\\[rs]n\", dbuf);\n" |
| 3448 |
"\\&\n" |
| 3449 |
" /*\n" |
| 3450 |
" * Fetch the payload of the authorization key, which is\n" |
| 3451 |
" * actually the callout data given to request_key().\n" |
| 3452 |
" */\n" |
| 3453 |
" akp_size = keyctl(KEYCTL_READ, KEY_SPEC_REQKEY_AUTH_KEY,\n" |
| 3454 |
" auth_key_payload, sizeof(auth_key_payload));\n" |
| 3455 |
" if (akp_size == -1) {\n" |
| 3456 |
" fprintf(fp, \"KEYCTL_READ failed: %s\\[rs]n\", strerror(errno));\n" |
| 3457 |
" exit(EXIT_FAILURE);\n" |
| 3458 |
" }\n" |
| 3459 |
"\\&\n" |
| 3460 |
" auth_key_payload[akp_size] = \\[aq]\\[rs]0\\[aq];\n" |
| 3461 |
" fprintf(fp, \"Auth key payload: %s\\[rs]n\", auth_key_payload);\n" |
| 3462 |
"\\&\n" |
| 3463 |
" /*\n" |
| 3464 |
" * For interest, get the ID of the authorization key and\n" |
| 3465 |
" * display it.\n" |
| 3466 |
" */\n" |
| 3467 |
" auth_key = keyctl(KEYCTL_GET_KEYRING_ID,\n" |
| 3468 |
" KEY_SPEC_REQKEY_AUTH_KEY);\n" |
| 3469 |
" if (auth_key == -1) {\n" |
| 3470 |
" fprintf(fp, \"KEYCTL_GET_KEYRING_ID failed: %s\\[rs]n\",\n" |
| 3471 |
" strerror(errno));\n" |
| 3472 |
" exit(EXIT_FAILURE);\n" |
| 3473 |
" }\n" |
| 3474 |
"\\&\n" |
| 3475 |
" fprintf(fp, \"Auth key ID: %jx\\[rs]n\", (uintmax_t) auth_key);\n" |
| 3476 |
"\\&\n" |
| 3477 |
" /*\n" |
| 3478 |
" * Fetch key ID for the request_key(2) destination keyring.\n" |
| 3479 |
" */\n" |
| 3480 |
" dest_keyring = keyctl(KEYCTL_GET_KEYRING_ID,\n" |
| 3481 |
" KEY_SPEC_REQUESTOR_KEYRING);\n" |
| 3482 |
" if (dest_keyring == -1) {\n" |
| 3483 |
" fprintf(fp, \"KEYCTL_GET_KEYRING_ID failed: %s\\[rs]n\",\n" |
| 3484 |
" strerror(errno));\n" |
| 3485 |
" exit(EXIT_FAILURE);\n" |
| 3486 |
" }\n" |
| 3487 |
"\\&\n" |
| 3488 |
" fprintf(fp, \"Destination keyring: %jx\\[rs]n\", (uintmax_t) dest_keyring);\n" |
| 3489 |
"\\&\n" |
| 3490 |
" /*\n" |
| 3491 |
" * Fetch the description of the authorization key. This\n" |
| 3492 |
" * allows us to see the key type, UID, GID, permissions,\n" |
| 3493 |
" * and description (name) of the key. Among other things,\n" |
| 3494 |
" * we will see that the name of the key is a hexadecimal\n" |
| 3495 |
" * string representing the ID of the key to be instantiated.\n" |
| 3496 |
" */\n" |
| 3497 |
" if (keyctl(KEYCTL_DESCRIBE, KEY_SPEC_REQKEY_AUTH_KEY,\n" |
| 3498 |
" dbuf, sizeof(dbuf)) == -1)\n" |
| 3499 |
" {\n" |
| 3500 |
" fprintf(fp, \"KEYCTL_DESCRIBE failed: %s\\[rs]n\", strerror(errno));\n" |
| 3501 |
" exit(EXIT_FAILURE);\n" |
| 3502 |
" }\n" |
| 3503 |
"\\&\n" |
| 3504 |
" fprintf(fp, \"Auth key description: %s\\[rs]n\", dbuf);\n" |
| 3505 |
"\\&\n" |
| 3506 |
" /*\n" |
| 3507 |
" * Instantiate the key using the callout data that was supplied\n" |
| 3508 |
" * in the payload of the authorization key.\n" |
| 3509 |
" */\n" |
| 3510 |
" if (keyctl(KEYCTL_INSTANTIATE, key_to_instantiate,\n" |
| 3511 |
" auth_key_payload, akp_size + 1, dest_keyring) == -1)\n" |
| 3512 |
" {\n" |
| 3513 |
" fprintf(fp, \"KEYCTL_INSTANTIATE failed: %s\\[rs]n\",\n" |
| 3514 |
" strerror(errno));\n" |
| 3515 |
" exit(EXIT_FAILURE);\n" |
| 3516 |
" }\n" |
| 3517 |
"\\&\n" |
| 3518 |
" exit(EXIT_SUCCESS);\n" |
| 3519 |
"}\n" |
| 3520 |
msgstr "" |
| 3521 |
|
| 3522 |
#. .BR find_key_by_type_and_name (3) |
| 3523 |
#. There is a man page, but this function seems not to exist |
| 3524 |
#. type: Plain text |
| 3525 |
#: debian-trixie |
| 3526 |
msgid "" |
| 3527 |
"B<keyctl>(1), B<add_key>(2), B<request_key>(2), B<keyctl>(3), " |
| 3528 |
"B<keyctl_assume_authority>(3), B<keyctl_chown>(3), B<keyctl_clear>(3), " |
| 3529 |
"B<keyctl_describe>(3), B<keyctl_describe_alloc>(3), B<keyctl_dh_compute>(3), " |
| 3530 |
"B<keyctl_dh_compute_alloc>(3), B<keyctl_get_keyring_ID>(3), " |
| 3531 |
"B<keyctl_get_persistent>(3), B<keyctl_get_security>(3), " |
| 3532 |
"B<keyctl_get_security_alloc>(3), B<keyctl_instantiate>(3), " |
| 3533 |
"B<keyctl_instantiate_iov>(3), B<keyctl_invalidate>(3), " |
| 3534 |
"B<keyctl_join_session_keyring>(3), B<keyctl_link>(3), B<keyctl_negate>(3), " |
| 3535 |
"B<keyctl_read>(3), B<keyctl_read_alloc>(3), B<keyctl_reject>(3), " |
| 3536 |
"B<keyctl_revoke>(3), B<keyctl_search>(3), B<keyctl_session_to_parent>(3), " |
| 3537 |
"B<keyctl_set_reqkey_keyring>(3), B<keyctl_set_timeout>(3), " |
| 3538 |
"B<keyctl_setperm>(3), B<keyctl_unlink>(3), B<keyctl_update>(3), " |
| 3539 |
"B<recursive_key_scan>(3), B<recursive_session_key_scan>(3), " |
| 3540 |
"B<capabilities>(7), B<credentials>(7), B<keyrings>(7), B<keyutils>(7), " |
| 3541 |
"B<persistent-keyring>(7), B<process-keyring>(7), B<session-keyring>(7), " |
| 3542 |
"B<thread-keyring>(7), B<user-keyring>(7), B<user_namespaces>(7), B<user-" |
| 3543 |
"session-keyring>(7), B<request-key>(8)" |
| 3544 |
msgstr "" |
| 3545 |
|
| 3546 |
#. type: Plain text |
| 3547 |
#: debian-trixie fedora-44 fedora-rawhide |
| 3548 |
msgid "" |
| 3549 |
"The kernel source files under I<Documentation/security/keys/> (or, before " |
| 3550 |
"Linux 4.13, in the file I<Documentation/security/keys.txt>)." |
| 3551 |
msgstr "" |
| 3552 |
|
| 3553 |
#. type: TH |
| 3554 |
#: fedora-44 fedora-rawhide |
| 3555 |
#, no-wrap |
| 3556 |
msgid "2024-08-21" |
| 3557 |
msgstr "" |
| 3558 |
|
| 3559 |
#. type: TH |
| 3560 |
#: fedora-44 fedora-rawhide |
| 3561 |
#, no-wrap |
| 3562 |
msgid "Linux man-pages 6.13" |
| 3563 |
msgstr "" |
| 3564 |
|
| 3565 |
#. type: TH |
| 3566 |
#: mageia-cauldron |
| 3567 |
#, no-wrap |
| 3568 |
msgid "Linux man-pages 6.17" |
| 3569 |
msgstr "" |
| 3570 |
|
| 3571 |
#. type: TH |
| 3572 |
#: opensuse-leap-16-1 opensuse-tumbleweed |
| 3573 |
#, no-wrap |
| 3574 |
msgid "Linux man-pages (unreleased)" |
| 3575 |
msgstr "" |