summaryrefslogtreecommitdiffstats
path: root/usr.bin/passwd/passwd.c
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>1995-12-16 09:45:17 +0000
committermarkm <markm@FreeBSD.org>1995-12-16 09:45:17 +0000
commit2d2185e129a0b9591326cf6780f33103e6daf487 (patch)
tree7cda69034c3f75363c1c91fd1cdf9f6f9b2de853 /usr.bin/passwd/passwd.c
parentc141a4f4bb83940bb7b6208d7605034c71eca2a2 (diff)
downloadFreeBSD-src-2d2185e129a0b9591326cf6780f33103e6daf487.zip
FreeBSD-src-2d2185e129a0b9591326cf6780f33103e6daf487.tar.gz
1) Fix local_passwd to co-operate with dual-personality crypt(3).
Changing a local passwd will now keep the encryption type that was originally used to encrypt the password, so folks adding DES to their systems will not be irritated/confused by having MD5'ed passwords in their master.passwd. Coming later is an option to allow the user to choose the encryption type. 2) Fix a bunch of compiler warnings announced by turning on -Wall. I did not get them all, that will come a bit later.
Diffstat (limited to 'usr.bin/passwd/passwd.c')
-rw-r--r--usr.bin/passwd/passwd.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/usr.bin/passwd/passwd.c b/usr.bin/passwd/passwd.c
index 31e005d..92dd895 100644
--- a/usr.bin/passwd/passwd.c
+++ b/usr.bin/passwd/passwd.c
@@ -29,18 +29,21 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
+ *
+ * $id$
+ *
*/
#ifndef lint
-static char copyright[] =
+static const char copyright[] =
"@(#) Copyright (c) 1988, 1993, 1994\n\
The Regents of the University of California. All rights reserved.\n";
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "From: @(#)passwd.c 8.3 (Berkeley) 4/2/94";
+static const char sccsid[] = "From: @(#)passwd.c 8.3 (Berkeley) 4/2/94";
static const char rcsid[] =
- "$Id: passwd.c,v 1.5 1995/08/13 16:07:35 wpaul Exp $";
+ "$Id$";
#endif /* not lint */
#include <err.h>
@@ -48,12 +51,14 @@ static const char rcsid[] =
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
+#include <string.h>
#ifdef YP
#include <pwd.h>
#include <pw_yp.h>
char *prog_name;
int __use_yp = 0;
+int yp_passwd(char *user);
#endif
#ifdef KERBEROS
OpenPOWER on IntegriCloud