4bff34e37def8a90f9194d81bc345c52ba20086athurlow * Copyright (c) 2001 Apple Computer, Inc. All rights reserved.
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * @APPLE_LICENSE_HEADER_START@
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * "Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * Reserved. This file contains Original Code and/or Modifications of
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * Original Code as defined in and that are subject to the Apple Public
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * Source License Version 1.0 (the 'License'). You may not use this file
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * except in compliance with the License. Please obtain a copy of the
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * License at http://www.apple.com/publicsource and read it before using
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * this file.
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * The Original Code and all software distributed under the License are
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * License for the specific language governing rights and limitations
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * under the License."
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * @APPLE_LICENSE_HEADER_END@
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * Routines for interacting with the user to get credentials
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * (workgroup/domain, username, password, etc.)
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross#if 0 /* not yet */
4bff34e37def8a90f9194d81bc345c52ba20086athurlow /* If input empty, accept default. */
4bff34e37def8a90f9194d81bc345c52ba20086athurlow /* Use input as new value. */
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross#endif /* not yet */
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross * Prompt for a new password after auth. failure.
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross * (and maybe new user+domain, but not yet)
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross * If we're getting a password, we must be doing
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross * some kind of NTLM, possibly after a failure to
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross * authenticate using Kerberos. Turn off krb5.
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross /* Tried a keychain hash and failed. */
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross /* XXX: delete the KC entry? */
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross /* Need command-line prompting. */
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross npw = getpassphrase(dgettext(TEXT_DOMAIN, "Password:"));
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross memset(ctx->ct_password, 0, sizeof (ctx->ct_password));
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross strlcpy(ctx->ct_password, npw, sizeof (ctx->ct_password));
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross * XXX: Ask the user for help, possibly via
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross * GNOME dbus or some such... (todo).
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross "Cannot prompt for a password when input is redirected."), 0);
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross * Recompute the password hashes.
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross err = ntlm_compute_lm_hash(ctx->ct_lmhash, ctx->ct_password);
613a2f6ba31e891e3d947a356daf5e563d43c1ceGordon Ross err = ntlm_compute_nt_hash(ctx->ct_nthash, ctx->ct_password);
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * Let user pick a share.
4bff34e37def8a90f9194d81bc345c52ba20086athurlow * Not supported.