Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
net-tools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
net-tools
Commits
8f124a70
Commit
8f124a70
authored
Jun 21, 2013
by
Bernd Eckenfels
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hostname: do not mention root on permission problems.
Thanks to Elias Probst for mentioning the problem.
parent
e5694253
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
hostname.c
hostname.c
+3
-3
No files found.
hostname.c
View file @
8f124a70
...
@@ -79,7 +79,7 @@ static void setnname(char *nname)
...
@@ -79,7 +79,7 @@ static void setnname(char *nname)
if
(
setnodename
(
nname
,
strlen
(
nname
)))
{
if
(
setnodename
(
nname
,
strlen
(
nname
)))
{
switch
(
errno
)
{
switch
(
errno
)
{
case
EPERM
:
case
EPERM
:
fprintf
(
stderr
,
_
(
"%s: you
must be root to change
the node name
\n
"
),
program_name
);
fprintf
(
stderr
,
_
(
"%s: you
don't have permission to set
the node name
\n
"
),
program_name
);
break
;
break
;
case
EINVAL
:
case
EINVAL
:
fprintf
(
stderr
,
_
(
"%s: name too long
\n
"
),
program_name
);
fprintf
(
stderr
,
_
(
"%s: name too long
\n
"
),
program_name
);
...
@@ -100,7 +100,7 @@ static void sethname(char *hname)
...
@@ -100,7 +100,7 @@ static void sethname(char *hname)
if
(
sethostname
(
hname
,
strlen
(
hname
)))
{
if
(
sethostname
(
hname
,
strlen
(
hname
)))
{
switch
(
errno
)
{
switch
(
errno
)
{
case
EPERM
:
case
EPERM
:
fprintf
(
stderr
,
_
(
"%s: you
must be root to change
the host name
\n
"
),
program_name
);
fprintf
(
stderr
,
_
(
"%s: you
don't have permission to set
the host name
\n
"
),
program_name
);
break
;
break
;
case
EINVAL
:
case
EINVAL
:
fprintf
(
stderr
,
_
(
"%s: name too long
\n
"
),
program_name
);
fprintf
(
stderr
,
_
(
"%s: name too long
\n
"
),
program_name
);
...
@@ -118,7 +118,7 @@ static void setdname(char *dname)
...
@@ -118,7 +118,7 @@ static void setdname(char *dname)
if
(
setdomainname
(
dname
,
strlen
(
dname
)))
{
if
(
setdomainname
(
dname
,
strlen
(
dname
)))
{
switch
(
errno
)
{
switch
(
errno
)
{
case
EPERM
:
case
EPERM
:
fprintf
(
stderr
,
_
(
"%s: you
must be root to change
the domain name
\n
"
),
program_name
);
fprintf
(
stderr
,
_
(
"%s: you
don't have permission to set
the domain name
\n
"
),
program_name
);
break
;
break
;
case
EINVAL
:
case
EINVAL
:
fprintf
(
stderr
,
_
(
"%s: name too long
\n
"
),
program_name
);
fprintf
(
stderr
,
_
(
"%s: name too long
\n
"
),
program_name
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment