1
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2
/* run-passwd.h: this file is part of users-admin, a gnome-system-tools frontend
3
* for user administration.
5
* Copyright (C) 2010 Milan Bouchet-Valat
7
* This program is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as
9
* published by the Free Software Foundation; either version 2 of the
10
* License, or (at your option) any later version.
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
17
* You should have received a copy of the GNU General Public License
18
* along with this program; if not, write to the Free Software
19
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
21
* Authors: Milan Bouchet-Valat <nalimilan@club.fr>
29
typedef struct PasswdHandler PasswdHandler;
31
typedef void (*PasswdCallback) (PasswdHandler *passwd_handler, GError *error, const gpointer user_data);
35
PASSWD_ERROR_REJECTED, /* New password is not secure enough */
36
PASSWD_ERROR_AUTH_FAILED, /* Wrong old password, or PAM failure */
37
PASSWD_ERROR_REAUTH_FAILED, /* Password has changed since first authentication */
38
PASSWD_ERROR_BACKEND, /* Backend error */
39
PASSWD_ERROR_UNKNOWN /* General error */
43
PasswdHandler *passwd_init (void);
45
void passwd_destroy (PasswdHandler *passwd_handler);
47
void passwd_authenticate (PasswdHandler *passwd_handler,
48
const char *current_password,
52
gboolean passwd_change_password (PasswdHandler *passwd_handler,
53
const char *new_password,
55
const gpointer user_data);
57
#endif /* _RUN_PASSWD_H */