summaryrefslogtreecommitdiff
path: root/device-functions.c
diff options
context:
space:
mode:
authorroot <root@avtech.domain.avtechpulse.com>1999-12-31 19:20:29 -0500
committerroot <root@avtech.domain.avtechpulse.com>1999-12-31 19:20:29 -0500
commit492e5c38fa1a5e42b4ad43c1daf119cfdedbc252 (patch)
tree4b8502a1db06885e45968db3f4406e73fb117164 /device-functions.c
parent74b9ff28228e3858ef4bc181a34a9acf9ca6be79 (diff)
tidy up username/password code
Diffstat (limited to 'device-functions.c')
-rw-r--r--device-functions.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/device-functions.c b/device-functions.c
index 8812cfa..516bbc9 100644
--- a/device-functions.c
+++ b/device-functions.c
@@ -4645,3 +4645,23 @@ int IO_Setup_RS232(int baud, char hardhand, gboolean update_flash)
return OK;
}
+int change_password (gchar *old_password, gchar *new_password) {
+
+ gboolean old_valid = TRUE;
+
+ // Skip password check if the supplied old_password is NULL. This
+ // only happens when resetting the password to the default.
+ if (old_password != NULL) {
+ printf ("verifying old password: %s\n", old_password); //FIXME with real function
+ // check, and set old_valid = FALSE if the password check fails
+ }
+
+ if (old_valid == TRUE) {
+ printf ("setting new password: %s\n" ,new_password); //FIXME with real function
+ // is a success test required?
+ return OK;
+ } else {
+ return password_change_error;
+ }
+}
+