if (! defined $userinfo ||
! exists $userinfo->{$user} || ! ref $userinfo->{$user} ||
! exists $userinfo->{$user}->{$field}) {
+ if ($field eq "realname" && defined $ENV{SSL_CLIENT_S_DN_CN}) {
+ userinfo_set($user, "realname", $ENV{SSL_CLIENT_S_DN_CN});
+ return $ENV{SSL_CLIENT_S_DN_CN};
+ }
return "";
}
+ if ($field eq "realname" && $userinfo->{$user}->{$field} eq "" &&
+ defined $ENV{SSL_CLIENT_S_DN_CN}) {
+ userinfo_set($user, "realname", $ENV{SSL_CLIENT_S_DN_CN});
+ return $ENV{SSL_CLIENT_S_DN_CN};
+ }
return $userinfo->{$user}->{$field};
}