Displaying 20 results from an estimated 254 matches for "gethostnam".
Did you mean:
gethostname
2012 Jun 28
1
[PATCH] klibc: fix gethostname()/getdomainname()
From: Maciej ?enczykowski <maze at google.com>
uname(2) returns (like all syscalls) 0 on success.
Signed-off-by: Maciej ?enczykowski <maze at google.com>
---
usr/klibc/getdomainname.c | 2 +-
usr/klibc/gethostname.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/usr/klibc/getdomainname.c b/usr/klibc/getdomainname.c
index 61722ca3519b..218ff0baa871 100644
--- a/usr/klibc/getdomainname.c
+++ b/usr/klibc/getdomainname.c
@@ -11,7 +11,7 @@ int getdomainname(char *name, size_t len)
{...
2003 Oct 30
1
Patch to make sshd work on multihomed systems
...ocalname[MAXHOSTNAMELEN];
+ char *socketname;
if (authctxt->pw == NULL)
return (0);
temporarily_use_uid(authctxt->pw);
+ socketname = get_local_name(packet_get_connection_in());
+ if (socketname) {
+ strlcpy(localname, socketname, MAXHOSTNAMELEN);
+ xfree(socketname);
+ } else if (gethostname(localname, MAXHOSTNAMELEN)) {
+ problem = -1;
+ goto out;
+ }
+
problem = krb5_init(authctxt);
if (problem)
goto out;
@@ -123,7 +135,7 @@
if (problem)
goto out;
- problem = krb5_sname_to_principal(authctxt->krb5_ctx, NULL, NULL,
+ problem = krb5_sname_to_principal(authctxt->kr...
2010 May 26
1
gethostname was not declared in this scope
Hi,
I am trying to compile the below code using wineg++ compiler in Linux system.
#include <stdio.h>
#include <winsock2.h>
int
main (int argc, char *argv[])
{
char host[50];
gethostname (host, sizeof host);
printf ("host: %s\n", host);
return 0;
}
I get the following error
gethost.cpp: In function ?int main(int, char**)?:
gethost.cpp:9: error: gethostname was not declared in this scope
winegcc: g++ failed
I found that to resolve the clash between...
2000 Dec 27
1
patch to support hurd-i386.
...t;ssh-keygen";
#endif /* HAVE___PROGNAME */
-char hostname[MAXHOSTNAMELEN];
+char *hostname;
void
ask_filename(struct passwd *pw, const char *prompt)
@@ -525,10 +525,24 @@
printf("You don't exist, go away!\n");
exit(1);
}
- if (gethostname(hostname, sizeof(hostname)) < 0) {
- perror("gethostname");
- exit(1);
- }
+ {
+ size_t size = 100;
+ hostname = (char *)malloc(size);
+ while (hostname) {
+ if (gethostname(hostnam...
2001 Nov 28
1
wine's winhelp doesn't compile
Hi,
using latest cvs code,
i can't compile the winhelp program.
There's a conflict for the gethostname fonction :
gcc -c -I. -I. -I../../include -I../../include -g -O2
-Wall -mpreferred-stack-boundary=2 -fPIC -DSTRICT
-DNONAMELESSUNION -DNONAMELESSSTRUCT -D_REENTRANT
-I/usr/X11R6/include -o lex.yy.o lex.yy.c
In file included from ../../include/winsock2.h:30,
from ../../include/w...
2008 Aug 13
1
RfE: use HOSTNAME environment variable in hostpid_init()
Hi,
All parts of dovecot except deliver uses the result of hostpid_init() in
src/lib/hostpid.c as a hostname which only asks gethostname().
deliver honours environment variable HOSTNAME in src/deliver/deliver.c:
getenv("HOSTNAME");
and uses the hostname of hostpid_init() as a fallback.
Wouldn't it be consequent to evaluate the environment variable HOSTNAME in
hostpid_init() with fallback to gethostname() and r...
2001 Jul 23
1
forwarded message from mouring@etoh.eviladmin.org
...in the following list shall be
omitted from <limits.h> on specific implementations where the corresponding
value is equal to or greater than the stated minimum, but is unspecified.
{HOST_NAME_MAX}
Maximum length of a host name (not including the terminating null)
as returned from the gethostname( ) function.
Minimum Acceptable Value: {_POSIX_HOST_NAME_MAX}
{_POSIX_HOST_NAME_MAX}
Maximum length of a host name (not including the
terminating null) as returned from the
gethostname( ) function.
Value: 255"
(note that _POSIX_HOST_NAME_MAX defines the minimum acceptable val...
2024 Jul 01
1
[PATCH RESEND 1/2] Permit %L and %l percent escapes in Include
...> char **cpptr, ***cppptr, fwdarg[256];
> u_int i, *uintptr, max_entries = 0;
> int r, oactive, negated, opcode, *intptr, value, value2, cmdline =
0; @@ -
>1983,6 +1984,12 @@ parse_pubkey_algos:
> "command-line option");
> goto out;
> }
>+
>+ if (gethostname(thishost, sizeof(thishost)) == -1)
>+ fatal("gethostname: %s", strerror(errno));
>+ strlcpy(shorthost, thishost, sizeof(shorthost));
>+ shorthost[strcspn(thishost, ".")] = '\0';
>+
> value = 0; g> while ((arg = argv_next(&ac,
&av)) != N...
2007 May 17
7
[Bug 616] proxycommand breaks hostbased authentication.
http://bugzilla.mindrot.org/show_bug.cgi?id=616
Damien Miller <djm at mindrot.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |djm at mindrot.org,
| |simon at sxw.org.uk
--- Comment #2 from
2002 Apr 10
1
openssh-3.1p1 on GNU/Hurd
...+SSHDOBJS= sshd.o auth.o auth1.o auth2.o auth-chall.o auth2-chall.o auth-rhosts.o auth-options.o auth-krb4.o auth-pam.o auth2-pam.o auth-passwd.o auth-rsa.o auth-rh-rsa.o auth-sia.o sshpty.o sshlogin.o loginrec.o servconf.o serverloop.o md5crypt.o session.o groupaccess.o auth-skey.o auth-bsdauth.o xgethostname.o
MANPAGES = scp.1.out ssh-add.1.out ssh-agent.1.out ssh-keygen.1.out ssh-keyscan.1.out ssh.1.out sshd.8.out sftp-server.8.out sftp.1.out
MANPAGES_IN = scp.1 ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh-keyscan.1 ssh.1 sshd.8 sftp-server.8 sftp.1
@@ -113,8 +113,8 @@
ssh-agent$(EXEEXT): $(LIBCOMPAT)...
2024 Jul 01
1
[PATCH RESEND 1/2] Permit %L and %l percent escapes in Include
...[NI_MAXHOST], shorthost[NI_MAXHOST];
char **cpptr, ***cppptr, fwdarg[256];
u_int i, *uintptr, max_entries = 0;
int r, oactive, negated, opcode, *intptr, value, value2, cmdline = 0;
@@ -1983,6 +1984,12 @@ parse_pubkey_algos:
"command-line option");
goto out;
}
+
+ if (gethostname(thishost, sizeof(thishost)) == -1)
+ fatal("gethostname: %s", strerror(errno));
+ strlcpy(shorthost, thishost, sizeof(shorthost));
+ shorthost[strcspn(thishost, ".")] = '\0';
+
value = 0;
while ((arg = argv_next(&ac, &av)) != NULL) {
if (*arg == ...
2008 Oct 13
4
my postfix ignores myhostname parameter
Hello guys,
I do not know how it is posible :
*vi /etc/postfix/main.cf*
# INTERNET HOST AND DOMAIN NAMES
#
# The myhostname parameter specifies the internet hostname of this
# mail system. The default is to use the fully-qualified domain name
# from gethostname(). $myhostname is used as a default value for many
# other configuration parameters.
#
#myhostname = host.domain.tld
myhostname = mail.hlacik.eu
*service postfix restart*
[root at sx1 postfix]# postconf -d myhostname
*myhostname = sx1.labs.hlacik.eu*
What is wrong??
I have Centos5.2 with late...
2024 Jul 01
1
[PATCH RESEND 1/2] Permit %L and %l percent escapes in Include
July 1, 2024 at 2:47 PM, rsbecker at nexbridge.com wrote:
> Would you be able to document that "thisHost" may be ambiguous, depending on
> the DNS and host resolver configuration? gethostname() is not entirely
> predictable if the localhost has multiple values.
Hm? On linux/glibc, gethostname just uses uname(2). It does not use dns or the
name service switch.
2007 Oct 17
2
[patch] ssh.c load_public_identity_files calls getpwuid twice without copy
...000000 -0700
+++ openssh-4.4p1-fix/ssh.c 2007-10-17 10:23:07.000000000 -0700
@@ -1252,6 +1252,7 @@
#endif /* SMARTCARD */
if ((pw = getpwuid(original_real_uid)) == NULL)
fatal("load_public_identity_files: getpwuid failed");
+ pw = pwcopy(pw);
if (gethostname(thishost, sizeof(thishost)) == -1)
fatal("load_public_identity_files: gethostname: %s",
strerror(errno));
--
Toby Butzon
2014 Jun 25
1
bug in samba?
...back on the never ending resolving issues.
?
Now im not a coder, but when we look at this example..
?
To draw another parallel, you seem to want the output of the command hostname --fqdn (which depends on the resolver), while others want hostname .
getfqdn seems to return a different result than gethostname if the hostname of the machine is an alias.
For example if I have this in /etc/hosts and with some python testing.
127.0.0.1 localhost localhost.localdomain localhost2 localhost2.localdomain2 mypersonaldomainname.tld
?
python -c 'import socket; print socket.getfqdn()'
?
gives localhost.l...
2023 Nov 14
1
[PATCH v3 1/2] Permit %L and %l percent escapes in ssh Include
...OST], shorthost[NI_MAXHOST];
char **cpptr, ***cppptr, fwdarg[256];
u_int i, *uintptr, uvalue, max_entries = 0;
int r, oactive, negated, opcode, *intptr, value, value2, cmdline = 0;
@@ -1951,6 +1952,12 @@ parse_pubkey_algos:
"command-line option");
goto out;
}
+
+ if (gethostname(thishost, sizeof(thishost)) == -1)
+ fatal("gethostname: %s", strerror(errno));
+ strlcpy(shorthost, thishost, sizeof(shorthost));
+ shorthost[strcspn(thishost, ".")] = '\0';
+
value = 0;
while ((arg = argv_next(&ac, &av)) != NULL) {
if (*arg == ...
2023 Dec 20
2
[PATCH RESEND 0/2] Permit %L and %l percent escapes in Include
Using these escapes, the include directive can be crafted to include
differing, host-specific configuration.
Ronan Pigott (2):
Permit %L and %l percent escapes in ssh Include
Permit %L and %l percent escapes in sshd Include
readconf.c | 16 +++++++++++++---
servconf.c | 17 ++++++++++++++---
2 files changed, 27 insertions(+), 6 deletions(-)
base-commit:
2024 Jul 01
2
[PATCH RESEND 0/2] Permit %L and %L percent escapes in Include
Using these escapes, the include directive can be crafted to include
differing, host-specific configuration.
Ronan Pigott (2):
Permit %L and %l percent escapes in Include
Permit %L and %l percent escapes in server Include
readconf.c | 16 +++++++++++++---
servconf.c | 21 ++++++++++++++++-----
2 files changed, 29 insertions(+), 8 deletions(-)
base-commit:
2006 Feb 20
2
Status of Bugzilla #1153
Hi,
I'd like to know if there is any chance to get bug 1153 fixed
soon ? It seems like a trivial issue, a patch is provided, and it's a
pain for us to manually patch every new release -- this was reported
as a portable-specific bug, but also affects vanilla openssh.
The bug is described at http://bugzilla.mindrot.org/show_bug.cgi?id=1153
Simon
--
Simon Vallet
Ing?nieur
2011 Jul 26
0
[PATCH 1/1] Staging: hv: util: kvp: Cleanup kvp_get_domain_name()
Cleanup kvp_get_domain_name(). If getaddrinfo() fails, deal with it properly
(this can happen if no IP address has been assigned). Also, don't specify
a specific service in the call to getaddrinfo() to make this code as generic
as possible. Lastly, move the call to gethostname() after the local variables.
Signed-off-by: K. Y. Srinivasan <kys at microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz at microsoft.com>
---
drivers/staging/hv/tools/hv_kvp_daemon.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/hv...