@@ -227,9 +227,11 @@ cmd_unlock(const char *fsname)
227
227
#endif
228
228
229
229
rc = nvlist_lookup_nvlist (props , "rfd77:ebox" , & prop );
230
+ if (rc )
231
+ rc = nvlist_lookup_nvlist (props , "com.joyent.kbm:ebox" , & prop );
230
232
if (rc ) {
231
- errx (EXIT_ERROR , "no rfd77: ebox property "
232
- "could be read on dataset %s" , fsname );
233
+ errx (EXIT_ERROR , "no ebox property could be read on "
234
+ "dataset %s" , fsname );
233
235
}
234
236
235
237
VERIFY0 (nvlist_lookup_string (prop , "value" , & b64 ));
@@ -359,6 +361,7 @@ cmd_rekey(const char *fsname)
359
361
const uint8_t * key = NULL ;
360
362
const uint8_t * nkey ;
361
363
size_t keylen , nkeylen ;
364
+ const char * propname ;
362
365
#if defined(DMU_OT_ENCRYPTED )
363
366
uint64_t kstatus ;
364
367
nvlist_t * nprops ;
@@ -375,9 +378,15 @@ cmd_rekey(const char *fsname)
375
378
props = zfs_get_user_props (ds );
376
379
VERIFY (props != NULL );
377
380
378
- if (nvlist_lookup_nvlist (props , "rfd77:ebox" , & prop )) {
379
- errx (EXIT_ERROR , "no rfd77:ebox property "
380
- "could be read on dataset %s" , fsname );
381
+ propname = "rfd77:ebox" ;
382
+ rc = nvlist_lookup_nvlist (props , propname , & prop );
383
+ if (rc ) {
384
+ propname = "com.joyent.kbm:ebox" ;
385
+ rc = nvlist_lookup_nvlist (props , propname , & prop );
386
+ }
387
+ if (rc ) {
388
+ errx (EXIT_ERROR , "no ebox property could be read on "
389
+ "dataset %s" , fsname );
381
390
}
382
391
383
392
VERIFY0 (nvlist_lookup_string (prop , "value" , & b64 ));
@@ -458,7 +467,7 @@ cmd_rekey(const char *fsname)
458
467
459
468
b64 = sshbuf_dtob64 (buf );
460
469
461
- rc = zfs_prop_set (ds , "rfd77:ebox" , b64 );
470
+ rc = zfs_prop_set (ds , propname , b64 );
462
471
if (rc != 0 ) {
463
472
errno = rc ;
464
473
err (EXIT_ERROR , "failed to set ZFS property rfd77:ebox "
0 commit comments