Lines Matching refs:buf

195 smb_getnetbiosname(char *buf, size_t buflen)
197 if (smb_gethostname(buf, buflen, SMB_CASE_UPPER) != 0)
201 buf[NETBIOS_NAME_SZ - 1] = '\0';
211 smb_getsamaccount(char *buf, size_t buflen)
213 if (smb_getnetbiosname(buf, buflen - 1) != 0)
216 (void) strlcat(buf, "$", buflen);
231 smb_gethostname(char *buf, size_t buflen, smb_caseconv_t which)
235 if (buf == NULL || buflen == 0)
238 if (gethostname(buf, buflen) != 0) {
239 *buf = '\0';
243 buf[buflen - 1] = '\0';
245 if ((p = strchr(buf, '.')) != NULL)
250 (void) smb_strlwr(buf);
254 (void) smb_strupr(buf);
271 smb_getfqhostname(char *buf, size_t buflen)
290 (void) strlcpy(buf, hostname, buflen);
294 (void) snprintf(buf, buflen, "%s.%s", hostname, domain);
306 smb_getdomainname(char *buf, size_t buflen)
310 if (buf == NULL || buflen == 0)
313 *buf = '\0';
314 rc = smb_config_getstr(SMB_CI_DOMAIN_NAME, buf, buflen);
316 if ((rc != SMBD_SMF_OK) || (*buf == '\0'))
332 smb_getfqdomainname(char *buf, size_t buflen)
337 if (buf == NULL || buflen == 0)
340 *buf = '\0';
342 rc = smb_config_getstr(SMB_CI_DOMAIN_FQDN, buf, buflen);
344 if ((rc != SMBD_SMF_OK) || (*buf == '\0'))
356 (void) strlcpy(buf, res_state.defdname, buflen);
390 smb_get_machine_passwd(uint8_t *buf, size_t buflen)
402 if (smb_auth_ntlm_hash(pwd, buf) != 0)
473 smb_ipc_get_user(char *buf, size_t buflen)
476 (void) strlcpy(buf, ipc_info.user, buflen);
481 smb_ipc_get_passwd(uint8_t *buf, size_t buflen)
487 (void) memcpy(buf, ipc_info.passwd, SMBAUTH_HASH_SZ);
583 char buf[128];
586 (void) vsnprintf(buf, 128, fmt, ap);
589 smb_trace(buf);