mirror of
https://github.com/stefanberger/swtpm.git
synced 2026-02-05 22:54:09 +00:00
swtpm_setup: Avoid calling getpwnam() if change_user == false
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
This commit is contained in:
parent
51f3860dfe
commit
a794d0fe48
@ -218,7 +218,7 @@ int main(int argc, char *argv[])
|
||||
* In case of TPM 1.2 we allow running this program as 'tss'
|
||||
* (E_USER_ID).
|
||||
*/
|
||||
if (!use_tpm2) {
|
||||
if (!use_tpm2 && change_user) {
|
||||
passwd = getpwnam(E_USER_ID);
|
||||
if (!passwd) {
|
||||
fprintf(stderr, "Could not get account data of user %s.\n", E_USER_ID);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user