Project

General

Profile

Actions

Bug #10041

open

By default, domainname(1) displays " " rather than ""

Added by Hubert Garavel over 4 years ago. Updated over 4 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2018-12-04
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:
External Bug:

Description

On a freshly installed OpenIndiana machine, with no domain name explicitly set,
domainname(1) displays a white space followed by line-feed rather than line-feed:

  1. domainname | od -t a
    0000000 sp lf
    0000002

The problem seems to be at the lower level of sysinfo(SI_SRPC_DOMAIN, ...)
which returns " " rather than ""

  1. truss domainname

execve("/usr/bin/domainname", 0x0803E02C, 0x0803E034) argc = 1
...
sysinfo(SI_SRPC_DOMAIN, " ", 256) = 2
ioctl(1, TCGETA, 0x0803D0EE) = 0
fstat64(1, 0x0803D030) = 0

write(1, " \n", 2) = 2
_exit(0)

  1. cat /etc/motd
    The Illumos Project SunOS 5.11 illumos-7d1eae8c55 December 2018
Actions #1

Updated by Hubert Garavel over 4 years ago

More details

\# svcs -a | grep nis
disabled 10:08:19 svc:/network/nis/client:default

\# svcs -a | grep dns
disabled 10:08:19 svc:/network/dns/install:default
disabled 10:08:21 svc:/network/dns/multicast:default
disabled 10:08:21 svc:/network/dns/server:default
online 10:08:38 svc:/network/dns/client:default

\# cat /etc/defaultdomain
cat: cannot open /etc/defaultdomain: No such file or directory

Actions #2

Updated by Hubert Garavel over 4 years ago

I was able to reproduce this problem on another machine, just after
a fresh installation using the OpenIndiana Live x86 DVD installer.

Perhaps, the problem is caused by the installer itself, which might
set the domain name to " ", although the machine is in a network
with a defined domain name.

Actions

Also available in: Atom PDF