Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
LSH
lsh
Commits
da6f135c
Commit
da6f135c
authored
Sep 15, 2003
by
Pontus Freyhult
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(unix_current_user): New function, return
username of current user. Rev: src/unix_user.c:1.61
parent
25a8dbc1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
src/unix_user.c
src/unix_user.c
+10
-0
No files found.
src/unix_user.c
View file @
da6f135c
...
...
@@ -1182,3 +1182,13 @@ make_unix_user_db(struct reaper *reaper,
return
&
self
->
super
;
}
struct
lsh_string
*
unix_current_user
(
void
)
{
struct
passwd
*
p
=
getpwuid
(
getuid
());
if
(
p
)
return
make_string
(
p
->
pw_name
);
return
NULL
;
}
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