diff options
author | delphij <delphij@FreeBSD.org> | 2015-06-04 07:25:40 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2015-06-04 07:25:40 +0000 |
commit | f7eabb8e53ea97ebe862db69ef977c69b07f1cf9 (patch) | |
tree | 596fce7c341decacdc591050f8f959dfcb3780f1 /usr.sbin/pwd_mkdb/pwd_mkdb.c | |
parent | 82c0d88211238b97e97ab1f5e112a21400d164bf (diff) | |
download | FreeBSD-src-f7eabb8e53ea97ebe862db69ef977c69b07f1cf9.zip FreeBSD-src-f7eabb8e53ea97ebe862db69ef977c69b07f1cf9.tar.gz |
Whitespace changes for r283981. No actual code changes.
Diffstat (limited to 'usr.sbin/pwd_mkdb/pwd_mkdb.c')
-rw-r--r-- | usr.sbin/pwd_mkdb/pwd_mkdb.c | 176 |
1 files changed, 88 insertions, 88 deletions
diff --git a/usr.sbin/pwd_mkdb/pwd_mkdb.c b/usr.sbin/pwd_mkdb/pwd_mkdb.c index 12d34da..69a2fae 100644 --- a/usr.sbin/pwd_mkdb/pwd_mkdb.c +++ b/usr.sbin/pwd_mkdb/pwd_mkdb.c @@ -469,97 +469,97 @@ main(int argc, char *argv[]) } if (lflag) { - /* Create insecure data. (legacy version) */ - p = buf; - COMPACT(pwd.pw_name); - COMPACT("*"); - LSCALAR(pwd.pw_uid); - LSCALAR(pwd.pw_gid); - LSCALAR(pwd.pw_change); - COMPACT(pwd.pw_class); - COMPACT(pwd.pw_gecos); - COMPACT(pwd.pw_dir); - COMPACT(pwd.pw_shell); - LSCALAR(pwd.pw_expire); - LSCALAR(pwd.pw_fields); - data.size = p - buf; - - /* Create secure data. (legacy version) */ - p = sbuf; - COMPACT(pwd.pw_name); - COMPACT(pwd.pw_passwd); - LSCALAR(pwd.pw_uid); - LSCALAR(pwd.pw_gid); - LSCALAR(pwd.pw_change); - COMPACT(pwd.pw_class); - COMPACT(pwd.pw_gecos); - COMPACT(pwd.pw_dir); - COMPACT(pwd.pw_shell); - LSCALAR(pwd.pw_expire); - LSCALAR(pwd.pw_fields); - sdata.size = p - sbuf; - - /* Store insecure by name. */ - tbuf[0] = LEGACY_VERSION(_PW_KEYBYNAME); - len = strlen(pwd.pw_name); - memmove(tbuf + 1, pwd.pw_name, len); - key.size = len + 1; - if ((dp->put)(dp, &key, &data, method) == -1) - error("put"); - - /* Store insecure by number. */ - tbuf[0] = LEGACY_VERSION(_PW_KEYBYNUM); - store = HTOL(cnt); - memmove(tbuf + 1, &store, sizeof(store)); - key.size = sizeof(store) + 1; - if ((dp->put)(dp, &key, &data, method) == -1) - error("put"); - - /* Store insecure by uid. */ - tbuf[0] = LEGACY_VERSION(_PW_KEYBYUID); - store = HTOL(pwd.pw_uid); - memmove(tbuf + 1, &store, sizeof(store)); - key.size = sizeof(store) + 1; - if ((dp->put)(dp, &key, &data, methoduid) == -1) - error("put"); + /* Create insecure data. (legacy version) */ + p = buf; + COMPACT(pwd.pw_name); + COMPACT("*"); + LSCALAR(pwd.pw_uid); + LSCALAR(pwd.pw_gid); + LSCALAR(pwd.pw_change); + COMPACT(pwd.pw_class); + COMPACT(pwd.pw_gecos); + COMPACT(pwd.pw_dir); + COMPACT(pwd.pw_shell); + LSCALAR(pwd.pw_expire); + LSCALAR(pwd.pw_fields); + data.size = p - buf; + + /* Create secure data. (legacy version) */ + p = sbuf; + COMPACT(pwd.pw_name); + COMPACT(pwd.pw_passwd); + LSCALAR(pwd.pw_uid); + LSCALAR(pwd.pw_gid); + LSCALAR(pwd.pw_change); + COMPACT(pwd.pw_class); + COMPACT(pwd.pw_gecos); + COMPACT(pwd.pw_dir); + COMPACT(pwd.pw_shell); + LSCALAR(pwd.pw_expire); + LSCALAR(pwd.pw_fields); + sdata.size = p - sbuf; + + /* Store insecure by name. */ + tbuf[0] = LEGACY_VERSION(_PW_KEYBYNAME); + len = strlen(pwd.pw_name); + memmove(tbuf + 1, pwd.pw_name, len); + key.size = len + 1; + if ((dp->put)(dp, &key, &data, method) == -1) + error("put"); - /* Store secure by name. */ - tbuf[0] = LEGACY_VERSION(_PW_KEYBYNAME); - len = strlen(pwd.pw_name); - memmove(tbuf + 1, pwd.pw_name, len); - key.size = len + 1; - if ((sdp->put)(sdp, &key, &sdata, method) == -1) - error("put"); + /* Store insecure by number. */ + tbuf[0] = LEGACY_VERSION(_PW_KEYBYNUM); + store = HTOL(cnt); + memmove(tbuf + 1, &store, sizeof(store)); + key.size = sizeof(store) + 1; + if ((dp->put)(dp, &key, &data, method) == -1) + error("put"); - /* Store secure by number. */ - tbuf[0] = LEGACY_VERSION(_PW_KEYBYNUM); - store = HTOL(cnt); - memmove(tbuf + 1, &store, sizeof(store)); - key.size = sizeof(store) + 1; - if ((sdp->put)(sdp, &key, &sdata, method) == -1) - error("put"); + /* Store insecure by uid. */ + tbuf[0] = LEGACY_VERSION(_PW_KEYBYUID); + store = HTOL(pwd.pw_uid); + memmove(tbuf + 1, &store, sizeof(store)); + key.size = sizeof(store) + 1; + if ((dp->put)(dp, &key, &data, methoduid) == -1) + error("put"); - /* Store secure by uid. */ - tbuf[0] = LEGACY_VERSION(_PW_KEYBYUID); - store = HTOL(pwd.pw_uid); - memmove(tbuf + 1, &store, sizeof(store)); - key.size = sizeof(store) + 1; - if ((sdp->put)(sdp, &key, &sdata, methoduid) == -1) - error("put"); + /* Store secure by name. */ + tbuf[0] = LEGACY_VERSION(_PW_KEYBYNAME); + len = strlen(pwd.pw_name); + memmove(tbuf + 1, pwd.pw_name, len); + key.size = len + 1; + if ((sdp->put)(sdp, &key, &sdata, method) == -1) + error("put"); - /* Store insecure and secure special plus and special minus */ - if (pwd.pw_name[0] == '+' || pwd.pw_name[0] == '-') { - tbuf[0] = LEGACY_VERSION(_PW_KEYYPBYNUM); - store = HTOL(ypcnt); + /* Store secure by number. */ + tbuf[0] = LEGACY_VERSION(_PW_KEYBYNUM); + store = HTOL(cnt); memmove(tbuf + 1, &store, sizeof(store)); key.size = sizeof(store) + 1; - if ((dp->put)(dp, &key, &data, method) == -1) - error("put"); if ((sdp->put)(sdp, &key, &sdata, method) == -1) error("put"); + + /* Store secure by uid. */ + tbuf[0] = LEGACY_VERSION(_PW_KEYBYUID); + store = HTOL(pwd.pw_uid); + memmove(tbuf + 1, &store, sizeof(store)); + key.size = sizeof(store) + 1; + if ((sdp->put)(sdp, &key, &sdata, methoduid) == -1) + error("put"); + + /* Store insecure and secure special plus and special minus */ + if (pwd.pw_name[0] == '+' || pwd.pw_name[0] == '-') { + tbuf[0] = LEGACY_VERSION(_PW_KEYYPBYNUM); + store = HTOL(ypcnt); + memmove(tbuf + 1, &store, sizeof(store)); + key.size = sizeof(store) + 1; + if ((dp->put)(dp, &key, &data, method) == -1) + error("put"); + if ((sdp->put)(sdp, &key, &sdata, method) == -1) + error("put"); + } } } - } /* Create original format password file entry */ if (is_comment && makeold){ /* copy comments */ if (fprintf(oldfp, "%s\n", line) < 0) @@ -589,13 +589,13 @@ main(int argc, char *argv[]) if ((sdp->put)(sdp, &key, &data, method) == -1) error("put"); if (lflag) { - tbuf[0] = LEGACY_VERSION(_PW_KEYYPENABLED); - key.size = 1; - if ((dp->put)(dp, &key, &data, method) == -1) - error("put"); - if ((sdp->put)(sdp, &key, &data, method) == -1) - error("put"); - } + tbuf[0] = LEGACY_VERSION(_PW_KEYYPENABLED); + key.size = 1; + if ((dp->put)(dp, &key, &data, method) == -1) + error("put"); + if ((sdp->put)(sdp, &key, &data, method) == -1) + error("put"); + } } if ((dp->close)(dp) == -1) |