Displaying 20 results from an estimated 247 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...
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)...
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...
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:
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...
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...
2007 Nov 13
2
Enhanced Kerberos support
...lti homed machines. The default is
?yes?. Note that this option applies only to protocol version 2 GSSAPI connections, and setting it
to ?no? may only work with recent Kerberos GSSAPI libraries.
I've heard that other daemons support multi-names by instead of using gethostname(), obtain the hostname of the
interface that the request came in on.
Can either approach be looked at for dovecot ?
Thanks,
--
Richard A Nelson (Rick) cowboy@((linux.)?vnet|us).ibm.com
Phone: 1-408-463-5584 Fax: 1-408-463-3873
COBOL Development IBM Silicon Valley Laboratory
htt...
2001 Dec 05
1
DISPLAY=localhost
...nections on the socket. */
for (n = 0; n < num_socks; n++) {
@@ -2475,53 +2473,10 @@
error("listen: %.100s", strerror(errno));
shutdown(sock, SHUT_RDWR);
close(sock);
- return NULL;
+ return -1;
}
}
- /* Set up a suitable value for the DISPLAY variable. */
- if (gethostname(hostname, sizeof(hostname)) < 0)
- fatal("gethostname: %.100s", strerror(errno));
-
-#ifdef IPADDR_IN_DISPLAY
- /*
- * HPUX detects the local hostname in the DISPLAY variable and tries
- * to set up a shared memory connection to the server, which it
- * incorrectly supposes to be...
2014 Jun 06
2
Libvirt Python Bindings - Remote Connection using openAuth.
...credential[4] = USER
elif credential[0] == libvirt.VIR_CRED_PASSPHRASE:
credential[4] = PASS
return 0
auth = [[libvirt.VIR_CRED_AUTHNAME, libvirt.VIR_CRED_PASSPHRASE], authcb, None]
conn = libvirt.openAuth("qemu+ssh://192.168.1.21/system", auth, 0)
print conn.getHostname()
-------------------------------
*If there is something wrong, how am I supposed to use it.*
If its not the right place to get libvirt-python related help, from
where can I get it.
Regards
Sijo