Deleted Added
full compact
pw_user.c (20679) pw_user.c (20712)
1/*-
2 * Copyright (C) 1996
3 * David L. Nugent. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (C) 1996
3 * David L. Nugent. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $Id: pw_user.c,v 1.5 1996/12/17 14:15:35 davidn Exp $
26 * $Id: pw_user.c,v 1.6 1996/12/19 15:22:45 davidn Exp $
27 */
28
29#include <unistd.h>
30#include <fcntl.h>
31#include <ctype.h>
32#include <paths.h>
33#include <sys/param.h>
34#include <dirent.h>

--- 789 unchanged lines hidden (view full) ---

824 for (i = 0; i < l; i++)
825 pwbuf[i] = chars[rndbuf[i] % sizeof(chars)];
826 pwbuf[i] = '\0';
827
828 /*
829 * We give this information back to the user
830 */
831 if (getarg(args, 'h') == NULL && getarg(args, 'N') == NULL) {
27 */
28
29#include <unistd.h>
30#include <fcntl.h>
31#include <ctype.h>
32#include <paths.h>
33#include <sys/param.h>
34#include <dirent.h>

--- 789 unchanged lines hidden (view full) ---

824 for (i = 0; i < l; i++)
825 pwbuf[i] = chars[rndbuf[i] % sizeof(chars)];
826 pwbuf[i] = '\0';
827
828 /*
829 * We give this information back to the user
830 */
831 if (getarg(args, 'h') == NULL && getarg(args, 'N') == NULL) {
832 if (isatty(0))
833 printf("Password is: ");
832 if (isatty(1))
833 printf("Password for '%s' is: ", user);
834 printf("%s\n", pwbuf);
835 fflush(stdout);
836 }
837 break;
838
839 case -2: /* No password at all! */
840 return "";
841

--- 138 unchanged lines hidden ---
834 printf("%s\n", pwbuf);
835 fflush(stdout);
836 }
837 break;
838
839 case -2: /* No password at all! */
840 return "";
841

--- 138 unchanged lines hidden ---