diff options
| author | David Bremner <david@tethera.net> | 2021-09-10 21:02:10 -0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2021-09-10 21:02:10 -0300 |
| commit | 7556bb7da27621895327b84d22abba2519c24ba7 (patch) | |
| tree | 1e2f371105684bab439ec99fe947321d66183b19 /lib | |
| parent | dc8262bd336f1c406e5705ec8cb5029f1bacd524 (diff) | |
| parent | 8e59438025c88ebd83a78cf12c06ff954d979e01 (diff) | |
Merge tag '0.33.1'
notmuch 0.33.1 release
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/config.cc | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/lib/config.cc b/lib/config.cc index 7ecc3c7b..8775b00a 100644 --- a/lib/config.cc +++ b/lib/config.cc @@ -543,25 +543,11 @@ _get_username_from_passwd_file (void *ctx) static const char * _get_email_from_passwd_file (void *ctx) { - - char hostname[256]; - struct hostent *hostent; - const char *domainname; char *email; char *username = _get_username_from_passwd_file (ctx); - gethostname (hostname, 256); - hostname[255] = '\0'; - - hostent = gethostbyname (hostname); - if (hostent && (domainname = strchr (hostent->h_name, '.'))) - domainname += 1; - else - domainname = "(none)"; - - email = talloc_asprintf (ctx, "%s@%s.%s", - username, hostname, domainname); + email = talloc_asprintf (ctx, "%s@localhost", username); talloc_free (username); return email; |
