• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/mkpasswd/mkpasswd.c
Thomas De SchampheleireThomas De Schampheleire committed 59e0692095007 Aug 2013
Raw file
Source viewDiff to previous
    { "bfy",        "$2y$", 22, 22, 1, "Blowfish, correct handling of 8-bit chars" },
 
1
/*
2
 * Copyright (C) 2001-2008  Marco d'Itri
3
 *
4
 * This program is free software; you can redistribute it and/or modify
5
 * it under the terms of the GNU General Public License as published by
6
 * the Free Software Foundation; either version 2 of the License, or
7
 * (at your option) any later version.
8
 *
9
 * This program is distributed in the hope that it will be useful,
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 * GNU General Public License for more details.
13
 *
14
 * You should have received a copy of the GNU General Public License
15
 * along with this program; if not, write to the Free Software
16
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17
 */
18
​
19
/* for crypt, snprintf and strcasecmp */
20
#define _XOPEN_SOURCE
21
#define _BSD_SOURCE
22
​
23
/* System library */
24
#include <stdio.h>
25
#include <stdlib.h>
26
#include <unistd.h>
27
#include "config.h"
28
#ifdef HAVE_GETOPT_LONG
29
#include <getopt.h>
30
#endif
31
#include <fcntl.h>
32
#include <string.h>
33
#include <time.h>
34
#include <sys/types.h>
35
#ifdef HAVE_XCRYPT
36
#include <xcrypt.h>
37
#include <sys/stat.h>
38
#endif
39
#ifdef HAVE_LINUX_CRYPT_GENSALT
40
#define _OW_SOURCE
41
#include <crypt.h>
42
#endif
43
#ifdef HAVE_GETTIMEOFDAY
44
#include <sys/time.h>
45
#endif
46
​
47
/* Application-specific */
48
#include "utils.h"
49
​
50
/* Global variables */
51
#ifdef HAVE_GETOPT_LONG
52
static const struct option longopts[] = {
53
    {"method",      optional_argument,  NULL, 'm'},
54
    /* for backward compatibility with versions < 4.7.25 (< 20080321): */
55
    {"hash",        optional_argument,  NULL, 'H'},
56
    {"help",        no_argument,        NULL, 'h'},
57
    {"password-fd", required_argument,  NULL, 'P'},
58
    {"stdin",       no_argument,        NULL, 's'},
59
    {"salt",        required_argument,  NULL, 'S'},
60
    {"rounds",      required_argument,  NULL, 'R'},
61
    {"version",     no_argument,        NULL, 'V'},
62
    {NULL,      0,          NULL, 0  }
63
};
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.