.\" DO NOT MODIFY THIS FILE! It was generated by gdoc. .TH "shishi_realm_default_guess" 3 "1.0.3" "shishi" "shishi" .SH NAME shishi_realm_default_guess \- API function .SH SYNOPSIS .B #include .sp .BI "char * shishi_realm_default_guess();" .SH "DESCRIPTION" Guesses a realm based on \fBgetdomainname()\fP, which really responds with a NIS/YP domain, but if set properly, it might be a good first guess. If this NIS query fails, call \fBgethostname()\fP, and on its failure, fall back to returning the artificial string "could\-not\-guess\-default\-realm". Note that the hostname is not trimmed off of the string returned by \fBgethostname()\fP, thus pretending the local host name is a valid realm name. The resulting corner case could merit a check that the suggested realm is distinct from the fully qualifies host, and if not, simply strip the host name from the returned string before it is used in an application. One reason for sticking with the present behaviour, is that some systems respond with a non\-qualified host name as reply from \fBgethostname()\fP. .SH "RETURN VALUE" Returns a guessed realm for the running host, containing a string that has to be deallocated with \fBfree()\fP by the caller. .SH "REPORTING BUGS" Report bugs to . GNU Shishi home page: http://www.gnu.org/software/shishi/ General help using GNU software: http://www.gnu.org/gethelp/ .SH COPYRIGHT Copyright \(co 2002-2022 Simon Josefsson. .br Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. .SH "SEE ALSO" The full documentation for .B shishi is maintained as a Texinfo manual. If the .B info and .B shishi programs are properly installed at your site, the command .IP .B info shishi .PP should give you access to the complete manual.