Lines Matching defs:keysource

48  * the keysource property
208 zfs_can_prompt_if_needed(char *keysource)
215 if (!keysource_prop_parser(keysource, &format, &locator, &uri))
493 "keysource points to multiple PKCS#11"
524 key_hdl_to_zc(libzfs_handle_t *hdl, zfs_handle_t *zhp, char *keysource,
543 if (!keysource_prop_parser(keysource, &format, &locator, &uri)) {
545 "invalid keysource property."));
821 char keysource[MAXNAMELEN];
847 if (zfs_prop_get(zhp, ZFS_PROP_KEYSOURCE, keysource, ZFS_MAXNAMELEN,
850 "no keysource property available."));
854 if (!zfs_can_prompt_if_needed(keysource)) {
868 ret = key_hdl_to_zc(zhp->zfs_hdl, zhp, keysource, crypt, &zc,
996 char keysource[ZFS_MAXNAMELEN];
1022 (void) zfs_prop_get(zhp, ZFS_PROP_KEYSOURCE, keysource,
1029 "keysource property not local, change key on '%s'."),
1037 * The only thing we currently expect in props is a keysource
1038 * if we have props without keysource then that isn't valid.
1051 (void) strlcpy(keysource, nkeysource, sizeof (keysource));
1057 if (!zfs_can_prompt_if_needed(keysource)) {
1064 ret = key_hdl_to_zc(zhp->zfs_hdl, zhp, keysource, crypt, &zc,
1087 * This is to verify that the proposed keysource property change via
1103 * the valid keysource changes have no restrictions.
1138 /* Validate the keysource provided is a valid keysource */
1140 zfs_valid_keysource(char *keysource)
1146 if (keysource == NULL)
1149 return (keysource_prop_parser(keysource, &format, &locator, &uri));
1164 char *keysource = NULL;
1199 zfs_prop_to_name(ZFS_PROP_KEYSOURCE), &keysource) == 0) {
1277 * that keysource wasn't specified when there is no crypto going on.
1280 zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "keysource "
1298 * Here we have encryption on so we need to find a valid keysource
1301 * Now lets see if we have an explicit setting for keysource and
1306 if (!zfs_valid_keysource(keysource)) {
1308 "invalid keysource \"%s\""), keysource);
1314 * If keysource is local then encryption has to be as well
1325 /* Get the already validated keysource from our parent */
1326 keysource = zfs_alloc(hdl, ZFS_MAXNAMELEN);
1327 if (keysource == NULL) {
1333 keysource, ZFS_MAXNAMELEN, &propsrctype, propsrc,
1336 "keysource must be provided."));
1356 * work here because we don't want keysource set
1359 * the default of keysource can change too.
1364 * inheriting keysource.
1371 (void) strlcpy(keysource, "passphrase,prompt",
1375 keysource) == 0);
1423 if (!zfs_can_prompt_if_needed(keysource)) {
1425 "unable to prompt for key material keysource = \"%s\"\n"),
1426 keysource);
1430 ret = key_hdl_to_zc(hdl, NULL, keysource, crypt, zc, cmd);
1442 free(keysource);
1450 * Can't rename "out" of same hierarchy if keysource would change.
1461 char keysource[ZFS_MAXNAMELEN];
1510 * From here on we need to check that keysource is
1513 if (zfs_prop_get(zhp, ZFS_PROP_KEYSOURCE, keysource,
1518 "keysource must be provided."));
1533 "keysource must be provided."));
1546 "keysource doesn't allow for rename, make keysource local."));