This varient always upper cases the hostname, which is needed for the
netbios name.
Andrew Bartlett
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);
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