Whitespace changes for r283981. No actual code changes.

This commit is contained in:
Xin LI 2015-06-04 07:25:40 +00:00
parent 3e08b16eca
commit ac57983523
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=283982

View File

@ -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 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;
/* 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 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");
/* 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 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 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);
/* 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");
/* 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 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 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)