continue;
};
- if (available) {
+ if (!strv_isempty(available)) {
r = safe_atou(s, &u);
if (r >= 0) {
if (u <= 0 || u > strv_length(available)) {
return log_oom();
}
- if (groups) {
+ if (!strv_isempty(groups)) {
strv_sort_uniq(groups);
r = sd_json_variant_set_field_strv(&arg_identity_extra, "memberOf", groups);
log_notice("Specified shell '%s' is not installed, try another one.", shell);
}
- if (shell) {
+ if (!isempty(shell)) {
log_info("Selected %s as the shell for user %s", shell, username);
r = sd_json_variant_set_field_string(&arg_identity_extra, "shell", shell);