Home
last modified time | relevance | path

Searched refs:cp (Results 1 – 25 of 92) sorted by relevance

1234

/openssh-portable/openbsd-compat/
H A Dpwcache.c57 struct ncache *cp; in user_from_uid() local
60 if (cp->uid != uid || cp->name == NULL) { in user_from_uid()
72 cp->uid = uid; in user_from_uid()
73 if (cp->name != NULL) in user_from_uid()
74 free(cp->name); in user_from_uid()
77 return (cp->name); in user_from_uid()
92 struct ncache *cp; in group_from_gid() local
95 if (cp->gid != gid || cp->name == NULL) { in group_from_gid()
107 cp->gid = gid; in group_from_gid()
109 free(cp->name); in group_from_gid()
[all …]
H A Dsetenv.c61 char **p, *cp; in __findenv() local
65 for (p = environ + *offset; (cp = *p) != NULL; ++p) { in __findenv()
66 for (np = name, i = len; i && *cp; i--) in __findenv()
67 if (*cp++ != *np++) in __findenv()
69 if (i == 0 && *cp++ == '=') { in __findenv()
71 return (cp); in __findenv()
86 char **P, *cp;
90 for (cp = str; *cp && *cp != '='; ++cp)
92 if (*cp != '=') {
97 if (__findenv(str, (int)(cp - str), &offset) != NULL) {
[all …]
H A Dgetrrsetbyname.c96 (cp) += INT16SZ; \
108 (cp) += INT32SZ; \
394 cp = answer; in parse_dns_response()
398 cp += HFIXEDSZ; in parse_dns_response()
479 *cp += length; in parse_dns_qsection()
483 *cp += INT16SZ; in parse_dns_qsection()
487 *cp += INT16SZ; in parse_dns_qsection()
526 *cp += length; in parse_dns_rrsection()
530 *cp += INT16SZ; in parse_dns_rrsection()
534 *cp += INT16SZ; in parse_dns_rrsection()
[all …]
H A Dinet_aton.c70 inet_addr(const char *cp)
74 if (inet_aton(cp, &val))
88 inet_aton(const char *cp, struct in_addr *addr) in inet_aton() argument
96 c = *cp; in inet_aton()
107 c = *++cp; in inet_aton()
109 base = 16, c = *++cp; in inet_aton()
116 c = *++cp; in inet_aton()
120 c = *++cp; in inet_aton()
134 c = *++cp; in inet_aton()
H A Dstrnlen.c30 const char *cp; in strnlen() local
32 for (cp = str; maxlen != 0 && *cp != '\0'; cp++, maxlen--) in strnlen()
35 return (size_t)(cp - str); in strnlen()
H A Dmd5.c29 (cp)[7] = (value) >> 56; \
30 (cp)[6] = (value) >> 48; \
31 (cp)[5] = (value) >> 40; \
32 (cp)[4] = (value) >> 32; \
33 (cp)[3] = (value) >> 24; \
34 (cp)[2] = (value) >> 16; \
35 (cp)[1] = (value) >> 8; \
36 (cp)[0] = (value); } while (0)
39 (cp)[3] = (value) >> 24; \
40 (cp)[2] = (value) >> 16; \
[all …]
/openssh-portable/regress/unittests/sshkey/
H A Dtest_file.c52 char *cp; in sshkey_file_tests() local
145 free(cp); in sshkey_file_tests()
154 free(cp); in sshkey_file_tests()
164 free(cp); in sshkey_file_tests()
236 free(cp); in sshkey_file_tests()
245 free(cp); in sshkey_file_tests()
255 free(cp); in sshkey_file_tests()
334 free(cp); in sshkey_file_tests()
343 free(cp); in sshkey_file_tests()
353 free(cp); in sshkey_file_tests()
[all …]
/openssh-portable/
H A Dauthfile.c224 cp = line; in sshkey_try_load_public()
225 switch (*cp) { in sshkey_try_load_public()
236 for (; *cp && (*cp == ' ' || *cp == '\t'); cp++) in sshkey_try_load_public()
238 if (*cp) { in sshkey_try_load_public()
240 cp[strcspn(cp, "\r\n")] = '\0'; in sshkey_try_load_public()
394 cp = line; in sshkey_in_file()
397 for (; *cp && (*cp == ' ' || *cp == '\t'); cp++) in sshkey_in_file()
401 switch (*cp) { in sshkey_in_file()
480 for (; *cp && (quoted || (*cp != ' ' && *cp != '\t')); cp++) { in sshkey_advance_past_options()
481 if (*cp == '\\' && cp[1] == '"') in sshkey_advance_past_options()
[all …]
H A Dscp.c1321 ull = strtoull(cp, &cp, 10);
1322 if (!cp || *cp++ != ' ')
1327 mtime.tv_usec = strtol(cp, &cp, 10);
1333 ull = strtoull(cp, &cp, 10);
1334 if (!cp || *cp++ != ' ')
1339 atime.tv_usec = strtol(cp, &cp, 10);
1346 if (*cp != 'C' && *cp != 'D') {
1361 for (++cp; cp < buf + 5; cp++) {
1362 if (*cp < '0' || *cp > '7')
1373 ull = strtoull(cp, &cp, 10);
[all …]
H A Daddrmatch.c316 char addrbuf[64], *mp, *cp; in addr_pton_cidr() local
325 masklen = strtoul(mp, &cp, 10); in addr_pton_cidr()
378 char *list, *cp, *o; in addr_match_list() local
390 neg = *cp == '!'; in addr_match_list()
392 cp++; in addr_match_list()
393 if (*cp == '\0') { in addr_match_list()
438 char *list, *cp, *o; in addr_match_cidr_list() local
450 if (*cp == '\0') { in addr_match_cidr_list()
466 __func__, cp); in addr_match_cidr_list()
471 if (strspn(cp, VALID_CIDR_CHARS) != strlen(cp)) { in addr_match_cidr_list()
[all …]
H A Dssh.c225 char *cp; in tilde_expand_paths() local
523 for (cp = *hostp; *cp != '\0'; cp++) { in resolve_canonicalize()
832 free(cp); in main()
1187 host = cp; in main()
1397 free(cp); in main()
1408 free(cp); in main()
1439 free(cp); in main()
1586 if (cp[0] == '$' && cp[1] != '{') { in main()
2063 free(cp); in ssh_session2()
2216 free(cp); in load_public_identity_files()
[all …]
H A Dhostfile.c165 char *cp; in hostfile_read_key() local
168 for (cp = *cpp; *cp == ' ' || *cp == '\t'; cp++) in hostfile_read_key()
175 for (; *cp == ' ' || *cp == '\t'; cp++) in hostfile_read_key()
179 *cpp = cp; in hostfile_read_key()
200 if (sp <= cp + 1 || sp >= cp + sizeof(marker)) in check_markers()
202 memcpy(marker, cp, sp - cp); in check_markers()
212 cp = sp; in check_markers()
213 for (; *cp == ' ' || *cp == '\t'; cp++) in check_markers()
216 *cpp = cp; in check_markers()
747 for (cp = line; *cp == ' ' || *cp == '\t'; cp++) in hostkeys_foreach()
[all …]
H A Ddh.c51 char *cp, *arg; in parse_prime() local
57 cp = line; in parse_prime()
58 if ((arg = strdelim(&cp)) == NULL) in parse_prime()
62 arg = strdelim(&cp); in parse_prime()
67 if (cp == NULL || *arg == '\0') in parse_prime()
69 arg = strsep(&cp, " "); /* type */ in parse_prime()
70 if (cp == NULL || *arg == '\0') in parse_prime()
79 if (cp == NULL || *arg == '\0') in parse_prime()
89 if (cp == NULL || *arg == '\0') in parse_prime()
105 gen = strsep(&cp, " "); /* gen */ in parse_prime()
[all …]
H A Dservconf.c1076 *condition = cp; in match_cfg_line()
1202 *condition = cp; in match_cfg_line()
1289 cp = line; in process_server_config_line_depth()
1294 arg = strdelim(&cp); in process_server_config_line_depth()
2145 if (cp == NULL || *cp == '\0') in process_server_config_line_depth()
2205 if (cp == NULL || *cp == '\0') in process_server_config_line_depth()
2221 if (cp == NULL) in process_server_config_line_depth()
2226 if (cp[len] != '/' && strcasecmp(cp + len, "none") != 0) in process_server_config_line_depth()
2246 if (cp == NULL) in process_server_config_line_depth()
2252 if (cp[len] != '/' && strcasecmp(cp + len, "none") != 0) in process_server_config_line_depth()
[all …]
H A Dmisc.c621 if (cp == NULL || *cp == NULL) in hpdelim2()
679 for (; *cp; ++cp) { in colon()
680 if (*cp == '@' && *(cp+1) == '[') in colon()
682 if (*cp == ']' && *(cp+1) == ':' && flag) in colon()
795 if ((cp = hpdelim(&tmp)) == NULL || *cp == '\0') in parse_user_host_port()
951 tmp = cp ? cp + 1 : NULL; in parse_uri()
989 char *cp; in addargs() local
1016 char *cp; in replacearg() local
2237 for (cp = name; *cp != '\0'; cp++) { in valid_env_name()
2238 if (!isalnum((u_char)*cp) && *cp != '_') in valid_env_name()
[all …]
H A Dmatch.c274 char *c, *s, *p, *ret, *cp, *sp; in match_list() local
277 c = cp = xstrdup(client); in match_list()
289 for ((p = strsep(&cp, SEP)), i=0; p && *p != '\0'; in match_list()
290 (p = strsep(&cp, SEP)), i++) { in match_list()
295 *next = (cp == NULL) ? in match_list()
296 strlen(c) : (u_int)(cp - c); in match_list()
323 char *cp, *tmp; in filter_list() local
334 while ((cp = strsep(&tmp, ",")) != NULL) { in filter_list()
335 r = match_pattern_list(cp, filter, 0); in filter_list()
339 strlcat(fix_prop, cp, len); in filter_list()
H A Dauth-rhosts.c86 char *host, *user, *cp; in check_rhosts_file() local
89 for (cp = buf; *cp == ' ' || *cp == '\t'; cp++) in check_rhosts_file()
91 if (*cp == '#' || *cp == '\n' || !*cp) in check_rhosts_file()
98 if (strncmp(cp, "NO_PLUS", 7) == 0) in check_rhosts_file()
H A Dssh-keygen.c960 cp[strcspn(cp, "\n")] = '\0'; in do_fingerprint()
963 if (*cp == '#' || *cp == '\0') in do_fingerprint()
997 *cp != '\t')); cp++) { in do_fingerprint()
1015 for (; *cp == ' ' || *cp == '\t'; cp++) in do_fingerprint()
1017 if (*cp != '\0' && *cp != '#') in do_fingerprint()
2257 cp = cp + strspn(cp, " \t"); in update_krl_from_file()
2294 cp = cp + strspn(cp, " \t"); in update_krl_from_file()
2299 cp = cp + strspn(cp, " \t"); in update_krl_from_file()
2308 cp = cp + strspn(cp, " \t"); in update_krl_from_file()
2312 cp = cp + strspn(cp, " \t"); in update_krl_from_file()
[all …]
H A Dutf8.c243 char *cp = NULL; in snmprintf() local
247 ret = vasnmprintf(&cp, sz, wp, fmt, ap); in snmprintf()
249 if (cp != NULL) { in snmprintf()
250 (void)strlcpy(str, cp, sz); in snmprintf()
251 free(cp); in snmprintf()
329 char *cp; in msetlocale() local
337 if ((cp = getenv(vars[i])) == NULL) in msetlocale()
339 if (strncasecmp(cp, "TR", 2) != 0) in msetlocale()
345 if ((strcasestr(cp, "UTF-8") != NULL || in msetlocale()
346 strcasestr(cp, "UTF8") != NULL) && in msetlocale()
H A Dauth2-pubkey.c335 ep = cp + strlen(cp) - 1; in check_principals_line()
348 line_opts = cp; in check_principals_line()
349 cp = ep; in check_principals_line()
391 for (cp = line; *cp == ' ' || *cp == '\t'; cp++) in process_principals()
396 if (!*cp || *cp == '\n') in process_principals()
596 key_options = cp; in check_authkey_line()
601 skip_space(&cp); in check_authkey_line()
715 char *cp, *line = NULL, loc[256]; in check_authkeys_file() local
730 cp = line; in check_authkeys_file()
731 skip_space(&cp); in check_authkeys_file()
[all …]
/openssh-portable/regress/
H A Dcheck-perm.c37 const char *cp; in safely_chroot() local
50 for (cp = path; cp != NULL;) { in safely_chroot()
51 if ((cp = strchr(cp, '/')) == NULL) in safely_chroot()
54 cp++; in safely_chroot()
55 memcpy(component, path, cp - path); in safely_chroot()
56 component[cp - path] = '\0'; in safely_chroot()
67 cp == NULL ? "" : "component ", component); in safely_chroot()
70 cp == NULL ? "" : "component ", component); in safely_chroot()
98 char *cp; in auth_secure_path() local
123 if ((cp = dirname(buf)) == NULL) { in auth_secure_path()
[all …]
H A Dscp.sh20 cp ${SRC}/scp-ssh-wrapper.sh ${OBJ}/scp-ssh-wrapper.scp
48 cp ${DATA} ${COPY}
54 cp ${DATA} ${COPY}
60 cp ${DATA} ${COPY}
67 cp ${DATA} ${DIR}/copy
74 cp ${DATA} ${DIR}/copy
81 cp ${DATA} ${DIR}/copy
95 cp -p ${DATA} ${DIR}/copy
96 cp -p ${DATA} ${DIR}/copy2
97 cp ${DATA} ${DIR2}/copy
H A Dscp-uri.sh13 cp ${SRC}/scp-ssh-wrapper.sh ${OBJ}/scp-ssh-wrapper.scp
24 cp $OBJ/ssh_config $OBJ/ssh_config.orig
39 cp ${DATA} ${COPY}
45 cp ${DATA} ${COPY}
52 cp ${DATA} ${DIR}/copy
61 cp ${DATA} ${DIR}/copy
/openssh-portable/regress/misc/fuzz-harness/
H A Dsshsigopt_fuzz.cc13 char *cp = (char *)malloc(size + 1); in LLVMFuzzerTestOneInput() local
16 if (cp == NULL) in LLVMFuzzerTestOneInput()
18 memcpy(cp, data, size); in LLVMFuzzerTestOneInput()
19 cp[size] = '\0'; in LLVMFuzzerTestOneInput()
20 if ((opts = sshsigopt_parse(cp, "libfuzzer", 0, NULL)) == NULL) in LLVMFuzzerTestOneInput()
24 free(cp); in LLVMFuzzerTestOneInput()
H A Dauthopt_fuzz.cc13 char *cp = (char *)malloc(size + 1); in LLVMFuzzerTestOneInput() local
16 if (cp == NULL || add == NULL) in LLVMFuzzerTestOneInput()
18 memcpy(cp, data, size); in LLVMFuzzerTestOneInput()
19 cp[size] = '\0'; in LLVMFuzzerTestOneInput()
20 if ((opts = sshauthopt_parse(cp, NULL)) == NULL) in LLVMFuzzerTestOneInput()
26 free(cp); in LLVMFuzzerTestOneInput()

Completed in 225 milliseconds

1234