Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zmap
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
zmap
Commits
78856e3c
Commit
78856e3c
authored
15 years ago
by
edgrif
Browse files
Options
Downloads
Patches
Plain Diff
fix buglet in getting hostname, I didn't think this could fail...ah well.
parent
5c182dcc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/zmapUtils/zmapUtilsUsers.c
+19
-11
19 additions, 11 deletions
src/zmapUtils/zmapUtilsUsers.c
with
19 additions
and
11 deletions
src/zmapUtils/zmapUtilsUsers.c
+
19
−
11
View file @
78856e3c
...
...
@@ -27,9 +27,9 @@
*
* Exported functions: See zmapUtils.h
* HISTORY:
* Last edited:
Apr 24 11:23 2009 (rds
)
* Last edited:
Feb 17 12:02 2010 (edgrif
)
* Created: Fri Dec 12 13:14:55 2008 (edgrif)
* CVS info: $Id: zmapUtilsUsers.c,v 1.
2
20
09-04-24 10:30:39 rds
Exp $
* CVS info: $Id: zmapUtilsUsers.c,v 1.
3
20
10-02-17 12:04:06 edgrif
Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -49,7 +49,7 @@ static gboolean developer_status_G = FALSE ;
/* Currently developers are limited to certain ids in certain domains. */
static
char
*
developers_G
[]
=
{
"edgrif"
,
"rds"
,
NULL
}
;
static
char
*
domain_G
[]
=
{
"sanger.ac.uk"
,
NULL
}
;
static
char
*
domain_G
[]
=
{
"localhost"
,
"sanger.ac.uk"
,
NULL
}
;
/* GLib 2.16 has the GChecksum package which we could use to encrypt this, otherwise we need
...
...
@@ -91,14 +91,22 @@ void zMapUtilsUserInit(void)
gboolean
status
=
FALSE
;
gboolean
name_status
,
domain_status
;
result
=
uname
(
&
name
)
;
result
=
uname
(
&
name
)
;
user_name
=
(
char
*
)
g_get_user_name
()
;
real_name
=
(
char
*
)
g_get_real_name
()
;
/* We assume that these cannot fail, not unreasonable. */
user_name
=
(
char
*
)
g_get_user_name
()
;
real_name
=
(
char
*
)
g_get_real_name
()
;
host_name
=
(
char
*
)
g_get_host_name
()
;
domain_data
=
gethostbyname
(
host_name
)
;
domain_name
=
domain_data
->
h_name
;
host_name
=
(
char
*
)
g_get_host_name
()
;
if
((
domain_data
=
gethostbyname
(
host_name
)))
{
domain_name
=
domain_data
->
h_name
;
}
else
{
zMapLogWarning
(
"Cannot find hostname from
\"
%s
\"
."
,
host_name
)
;
domain_name
=
"localhost"
;
}
name_status
=
domain_status
=
FALSE
;
...
...
@@ -141,8 +149,8 @@ void zMapUtilsUserInit(void)
}
/* Currently developers are limited to certain ids in certain domains. */
if
(
name_status
&&
domain_status
)
status
=
TRUE
;
if
(
name_status
&&
domain_status
)
status
=
TRUE
;
developer_status_G
=
status
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment