Comments (2)
Ugh. Solaris seems to have manual pages claiming it has flock() but they lie.
Probably I should rewrite this using fcntl() which is probably more portable.
Probably the function would change to something like:
snooze(int seconds)
{
int slfd;
struct flock lock;
lock.l_type= F_WRLCK;
lock.l_whence= SEEK_SET;
lock.l_start= 0;
lock.l_len= 0;
/* Lock the sleep-lock file to serialize our sleeps */
if ((slfd= open(SLEEP_LOCK,O_CREAT|O_RDWR,0644)) >= 0)
fcntl(slfd,F_SETLKW,&lock);
sleep(seconds);
/* Release sleep-lock file */
/*lock.l_type= F_UNLCK; fcntl(slfd,F_SETLK,&lock);*/
close(slfd);
}
But I haven't tested that at all.
Original comment by [email protected]
on 5 Oct 2011 at 4:16
- Changed state: Accepted
from pwauth.
Version 2.3.10 has been modified to use fcntl() locking instead of flock()
locking. Since fcntl() is a POSIX standard, I believe it should be more
portable and should work on Solaris.
Original comment by [email protected]
on 6 Oct 2011 at 2:32
- Changed state: Fixed
from pwauth.
Related Issues (8)
- Modify main.c to call geteuid instead of getuid HOT 1
- Undefined symbol: .flock in AIX HOT 4
- MAX_FAIL_COUNT not working with FAILLOG_PWAUTH (and maybe with FAILLOG_OPENBSD) HOT 1
- not accepting username with @
- pwauth segfault when it uses pam_smbpass and pam_winbind modules
- lack into auth_pam.c for mac OS X leopard (pwauth-2.3.11)
- Linking should be done with $(LDFLAGS)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pwauth.