Home
last modified time | relevance | path

Searched refs:snprintf (Results 1 – 25 of 63) sorted by relevance

123

/openssh-portable/regress/unittests/conversion/
H A Dtests.c43 snprintf(buf, sizeof buf, "%llu", (unsigned long long)INT_MAX); in tests()
45 snprintf(buf, sizeof buf, "%llu", (unsigned long long)INT_MAX + 1); in tests()
49 snprintf(buf, sizeof buf, "%lluM", (unsigned long long)INT_MAX/60 + 1); in tests()
/openssh-portable/openbsd-compat/regress/
H A Dsnprintftest.c52 snprintf(b,5,"123456789"); in main()
61 snprintf(b, sizeof(b), "%.*s", 1, src); in main()
67 if (snprintf(b, 1, "%s %d", "hello", 12345) != 11) in main()
/openssh-portable/regress/
H A Dcheck-perm.c103 snprintf(err, errlen, "realpath %s failed: %s", name, in auth_secure_path()
111 snprintf(err, errlen, "%s is not a regular file", buf); in auth_secure_path()
116 snprintf(err, errlen, "bad ownership or modes for file %s", in auth_secure_path()
124 snprintf(err, errlen, "dirname() failed"); in auth_secure_path()
132 snprintf(err, errlen, in auth_secure_path()
H A Dmkdtemp.c51 r = snprintf(template, sizeof(template), "%s/%s", tmpdir, base); in main()
/openssh-portable/openbsd-compat/
H A Dbsd-openpty.c173 snprintf(ptbuf, sizeof(ptbuf), "/dev/pty%c%c", in openpty()
175 snprintf(ttbuf, sizeof(ttbuf), "/dev/tty%c%c", in openpty()
180 snprintf(ptbuf, sizeof(ptbuf), "/dev/ptyp%d", i); in openpty()
181 snprintf(ttbuf, sizeof(ttbuf), "/dev/ttyp%d", i); in openpty()
H A Dpwcache.c70 (void)snprintf(nbuf, sizeof(nbuf), "%lu", (u_long)uid); in user_from_uid()
105 (void)snprintf(nbuf, sizeof(nbuf), "%lu", (u_long)gid); in group_from_gid()
H A Dport-net.c175 snprintf(ifr.ifr_name, sizeof(ifr.ifr_name), name, tun); in sys_tun_open()
233 snprintf(name, sizeof(name), "/dev/%s%d", tunbase, tun); in sys_tun_open()
237 snprintf(name, sizeof(name), "/dev/%s%d", in sys_tun_open()
267 snprintf(ifr.ifr_name, sizeof(ifr.ifr_name), "%s%d", tunbase, tun); in sys_tun_open()
H A Dbsd-signal.c31 (void)snprintf(buf, sizeof(buf), "%d", sig); in strsignal()
H A Dinet_ntoa.c54 (void)snprintf(b, sizeof(b), in inet_ntoa()
H A Dinet_ntop.c92 l = snprintf(tmp, size, fmt, src[0], src[1], src[2], src[3]); in inet_ntop4()
185 advance = snprintf(tp, ep - tp, "%x", words[i]); in inet_ntop6()
H A Dfmt_scaled.c269 (void)snprintf(result, FMT_SCALED_STRSIZE, "%lld%c", in fmt_scaled()
272 (void)snprintf(result, FMT_SCALED_STRSIZE, "%lld.%1lld%c", in fmt_scaled()
H A Dbsd-closefrom.c134 len = snprintf(fdpath, sizeof(fdpath), "/proc/%ld/fd", (long)getpid()); in closefrom()
H A Dport-aix.c85 i = snprintf(cp, len, "LOGNAME=%s%cNAME=%s%c", pw->pw_name, '\0', in aix_usrinfo()
432 snprintf(serv, servlen, "%d", sa6->sin6_port); in sshaix_getnameinfo()
/openssh-portable/
H A Dprogressmeter.c99 snprintf(buf, size, "%3lld.%1lld%c%s", in format_rate()
113 snprintf(buf, size, "%4lld%c%s", in format_size()
181 snprintf(buf + strlen(buf), win_size - strlen(buf), in refresh_progress_meter()
216 snprintf(buf + strlen(buf), win_size - strlen(buf), in refresh_progress_meter()
219 snprintf(buf + strlen(buf), win_size - strlen(buf), in refresh_progress_meter()
H A Daudit-bsm.c336 (void) snprintf(textbuf, sizeof (textbuf), in bsm_audit_bad_login()
341 (void) snprintf(textbuf, sizeof (textbuf), in bsm_audit_bad_login()
364 snprintf(buf, sizeof(buf), "%08x %08x %08x %08x", tid->at_addr[0], in audit_connection_from()
371 snprintf(buf, sizeof(buf), "%08x", tid->machine); in audit_connection_from()
408 snprintf(textbuf, sizeof(textbuf), in audit_event()
419 snprintf(textbuf, sizeof(textbuf), in audit_event()
434 snprintf(textbuf, sizeof(textbuf), in audit_event()
H A Dsftp-common.c226 snprintf(ubuf, sizeof ubuf, "%u", (u_int)st->st_uid); in ls_file()
228 snprintf(gbuf, sizeof gbuf, "%u", (u_int)st->st_gid); in ls_file()
234 snprintf(lc, sizeof(lc), "%u", (u_int)st->st_nlink); in ls_file()
250 snprintf(buf, sizeof buf, "%s %3s %-*s %-*s %8s %s %s", in ls_file()
254 snprintf(buf, sizeof buf, "%s %3s %-*s %-*s %8llu %s %s", in ls_file()
H A Dlog.c388 snprintf(fmtbuf, sizeof(fmtbuf), "%s: %s", txt, fmt); in do_log()
394 snprintf(fmtbuf, sizeof(fmtbuf), "%s: %s", msgbuf, suffix); in do_log()
406 snprintf(msgbuf, sizeof msgbuf, "%.*s\r\n", in do_log()
469 snprintf(tag, sizeof(tag), "%.48s:%.48s():%d (pid=%ld)", in sshlogv()
480 snprintf(fmt2, sizeof(fmt2), "%s: %s", tag, fmt); in sshlogv()
482 snprintf(fmt2, sizeof(fmt2), "%s: %s", func, fmt); in sshlogv()
H A Dmisc.c640 snprintf(buf, TF_LEN, "%02u:%02u:%02u", hrs, min, sec); in fmt_timeframe()
1344 snprintf(name, sizeof(name), "/dev/%s%d", in tun_open()
1435 snprintf(b, sizeof(b), "%02x", p[i]); in tohex()
1721 r = snprintf(s, len, "%s/ssh-XXXXXXXXXXXX", tmpdir); in mktemp_proto()
1725 r = snprintf(s, len, "/tmp/ssh-XXXXXXXXXXXX"); in mktemp_proto()
2088 snprintf(err, errlen, "realpath %s failed: %s", name, in safe_path()
2109 snprintf(err, errlen, "dirname() failed"); in safe_path()
2117 snprintf(err, errlen, in safe_path()
2150 snprintf(err, errlen, "cannot stat file %s: %s", in safe_path_fd()
2242 snprintf(errbuf, sizeof(errbuf), "domain name " in valid_domain()
[all …]
H A Dlogintest.c161 snprintf(cmdstring, sizeof(cmdstring), "who | grep '%s '", in testAPI()
208 snprintf(cmdstring, sizeof(cmdstring), "last | grep '%s ' | head -3", in testAPI()
H A Dauth-rhosts.c211 snprintf(buf, sizeof buf, "%.500s/%.100s", in auth_rhosts2()
278 snprintf(buf, sizeof buf, "%.500s/%.100s", in auth_rhosts2()
H A Dauth-krb5.c186 snprintf(authctxt->krb5_ccname, len, "FILE:%s", in auth_krb5_password()
248 ret = snprintf(ccname, sizeof(ccname), in ssh_krb5_cc_gen()
H A Dsession.c682 snprintf(session_type, sizeof(session_type), in do_exec()
685 snprintf(session_type, sizeof(session_type), in do_exec()
688 snprintf(session_type, sizeof(session_type), "shell"); in do_exec()
691 snprintf(session_type, sizeof(session_type), "command"); in do_exec()
1056 snprintf(buf, sizeof buf, "%.200s/%.50s", in do_setup_env()
1123 snprintf(buf, sizeof buf, "%.200s/%s/environment", in do_setup_env()
1166 snprintf(buf, sizeof buf, "%.50s %d %d", in do_setup_env()
1172 snprintf(buf, sizeof buf, "%.50s %d %.50s %d", in do_setup_env()
1393 snprintf(uidstr, sizeof(uidstr), "%llu", in do_setusercontext()
2606 snprintf(display, sizeof display, "localhost:%u.%u", in session_setup_x11fwd()
[all …]
H A Dmoduli.c457 r = snprintf(tmp, sizeof(tmp), "%s.XXXXXXXXXX", cpfile); in write_checkpoint()
524 snprintf(buf, sizeof buf, "%dd %d:%02d", day, hr, min); in fmt_time()
526 snprintf(buf, sizeof buf, "%d:%02d", hr, min); in fmt_time()
/openssh-portable/regress/unittests/misc/
H A Dtest_convtime.c48 snprintf(buf, sizeof buf, "%llu", (long long unsigned)INT_MAX); in test_convtime()
50 snprintf(buf, sizeof buf, "%llu", (long long unsigned)INT_MAX + 1); in test_convtime()
/openssh-portable/regress/unittests/test_helper/
H A Dfuzz.c110 snprintf(s, n, "%s case %zu of %zu (bit: %zu)\n", in fuzz_fmt()
115 snprintf(s, n, "%s case %llu of %llu (bits: %zu, %zu)\n", in fuzz_fmt()
122 snprintf(s, n, "%s case %zu of %zu (byte: %zu)\n", in fuzz_fmt()
127 snprintf(s, n, "%s case %llu of %llu (bytes: %zu, %zu)\n", in fuzz_fmt()
134 snprintf(s, n, "%s case %zu of %zu (offset: %zu)\n", in fuzz_fmt()
139 snprintf(s, n, "%s case %zu of %zu (offset: %zu)\n", in fuzz_fmt()
145 snprintf(s, n, "%s case %llu of %llu (offset: %zu char: %c)\n", in fuzz_fmt()

123