aboutsummaryrefslogtreecommitdiffstats
path: root/fripost-passwd
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem.moulin@fripost.org>2012-04-28 17:51:04 +0200
committerGuilhem Moulin <guilhem.moulin@fripost.org>2012-04-28 17:51:04 +0200
commit21ac651a4d40472515f5f7d0dd0cd7d27682ee50 (patch)
treea6facdc7e832399778bdd6169910530856590a6f /fripost-passwd
parent5dd3d8d080b56d742de3c4b4782cfcde72c3f16f (diff)
wibble
Diffstat (limited to 'fripost-passwd')
-rwxr-xr-xfripost-passwd3
1 files changed, 3 insertions, 0 deletions
diff --git a/fripost-passwd b/fripost-passwd
index e03deb5..8fad371 100755
--- a/fripost-passwd
+++ b/fripost-passwd
@@ -153,6 +153,9 @@ $password //= hash( undef, undef, prompt_password() );
# Ensure that the user exists.
+my $domain = (split /\@/, $username, 2)[1];
+die "Error: Unknown domain `" .$domain. "'.\n"
+ unless $ldap->domain->search({ domain => $domain })->count;
die "Error: Unknown user `" .$username. "'.\n"
unless $ldap->user->search({ username => $username })->count;