diff options
| author | David Bremner <david@tethera.net> | 2021-09-20 07:19:01 -0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2021-09-20 07:19:01 -0300 |
| commit | 0deced676415d581d00e8346f490aa139b1f86ff (patch) | |
| tree | 17337ff09b92075d59ee8734d20c8dfd9f2685b0 /lib | |
| parent | 3901179d2ed93f7ee48eec05f417b275f411293f (diff) | |
| parent | 8e59438025c88ebd83a78cf12c06ff954d979e01 (diff) | |
Merge tag '0.33.1' into debian/bullseye-backports
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; |
