mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 08:25:20 +09:00
homectl: when taking a JSON user record as input, strip secttions we don't want rather than complain about them
This makes it easier to take a user record from one host and create an identical user on another.
This commit is contained in:
@@ -1146,7 +1146,18 @@ static int acquire_new_home_record(UserRecord **ret) {
|
||||
if (!hr)
|
||||
return log_oom();
|
||||
|
||||
r = user_record_load(hr, v, USER_RECORD_REQUIRE_REGULAR|USER_RECORD_ALLOW_SECRET|USER_RECORD_ALLOW_PRIVILEGED|USER_RECORD_ALLOW_PER_MACHINE|USER_RECORD_ALLOW_SIGNATURE|USER_RECORD_LOG|USER_RECORD_PERMISSIVE);
|
||||
r = user_record_load(
|
||||
hr,
|
||||
v,
|
||||
USER_RECORD_REQUIRE_REGULAR|
|
||||
USER_RECORD_ALLOW_SECRET|
|
||||
USER_RECORD_ALLOW_PRIVILEGED|
|
||||
USER_RECORD_ALLOW_PER_MACHINE|
|
||||
USER_RECORD_STRIP_BINDING|
|
||||
USER_RECORD_STRIP_STATUS|
|
||||
USER_RECORD_STRIP_SIGNATURE|
|
||||
USER_RECORD_LOG|
|
||||
USER_RECORD_PERMISSIVE);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user