mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
s3-lib Add myhostname_upper()
This varient always upper cases the hostname, which is needed for the netbios name. Andrew Bartlett
This commit is contained in:
parent
bb00f97a82
commit
0e95311c23
@ -565,6 +565,7 @@ int set_maxfiles(int requested_max);
|
||||
int smb_mkstemp(char *name_template);
|
||||
void *smb_xmalloc_array(size_t size, unsigned int count);
|
||||
char *myhostname(void);
|
||||
char *myhostname_upper(void);
|
||||
char *lock_path(const char *name);
|
||||
char *pid_path(const char *name);
|
||||
char *state_path(const char *name);
|
||||
|
@ -1456,6 +1456,22 @@ char *myhostname(void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*****************************************************************
|
||||
Get local hostname and cache result.
|
||||
*****************************************************************/
|
||||
|
||||
char *myhostname_upper(void)
|
||||
{
|
||||
char *name;
|
||||
static char *ret;
|
||||
if (ret == NULL) {
|
||||
name = get_myname(talloc_tos());
|
||||
ret = strupper_talloc(NULL, name);
|
||||
talloc_free(name);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns an absolute path to a file concatenating the provided
|
||||
* @a rootpath and @a basename
|
||||
|
Loading…
Reference in New Issue
Block a user