Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tarantool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
tarantool
Commits
077dc38c
Commit
077dc38c
authored
7 years ago
by
bigbes
Committed by
Roman Tsisyk
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
pwd: fix bug with infinite loop on centos7
+ delete semicolons at end-of-line
parent
eb44a7ba
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/lua/pwd.lua
+14
-6
14 additions, 6 deletions
src/lua/pwd.lua
with
14 additions
and
6 deletions
src/lua/pwd.lua
+
14
−
6
View file @
077dc38c
...
...
@@ -82,7 +82,7 @@ ffi.cdef[[
local
function
_getpw
(
uid
)
local
pw
=
nil
errno
(
0
)
;
errno
(
0
)
if
type
(
uid
)
==
'number'
then
pw
=
ffi
.
C
.
getpwuid
(
uid
)
elseif
type
(
uid
)
==
'string'
then
...
...
@@ -95,7 +95,7 @@ end
local
function
_getgr
(
gid
)
local
gr
=
nil
errno
(
0
)
;
errno
(
0
)
if
type
(
gid
)
==
'number'
then
gr
=
ffi
.
C
.
getgrgid
(
gid
)
elseif
type
(
gid
)
==
'string'
then
...
...
@@ -159,7 +159,11 @@ local function getpw(uid)
end
local
function
getpwall
()
errno
(
0
);
errno
(
0
)
ffi
.
C
.
setpwent
()
if
errno
()
~=
0
then
return
nil
end
local
pws
=
{}
while
true
do
local
pw
=
ffi
.
C
.
getpwent
()
...
...
@@ -168,7 +172,7 @@ local function getpwall()
end
table.insert
(
pws
,
getpw
(
pw
.
pw_uid
))
end
ffi
.
C
.
endpwent
()
;
ffi
.
C
.
endpwent
()
if
errno
()
~=
0
then
return
nil
end
...
...
@@ -176,7 +180,11 @@ local function getpwall()
end
local
function
getgrall
()
errno
(
0
);
errno
(
0
)
ffi
.
C
.
setgrent
()
if
errno
()
~=
0
then
return
nil
end
local
grs
=
{}
while
true
do
local
gr
=
ffi
.
C
.
getgrent
()
...
...
@@ -185,7 +193,7 @@ local function getgrall()
end
table.insert
(
grs
,
getpw
(
gr
.
gr_gid
))
end
ffi
.
C
.
endgrent
()
;
ffi
.
C
.
endgrent
()
if
errno
()
~=
0
then
return
nil
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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