Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@Wombat server config calls an auth bash script which gets a temp file as parameter including the username/password which extracts those and passes it to a php file with the usee/pass as params yet again :).
User authenticated? exit(0);
Not authenticated? exit(1);
Simple but effective :) -
@linuxxx not to be the dumb one here but is that how it should be done? Or there are other ways?
-
@gitpush Deffo not the only way and there are addons but couldn't figure them out and they stored loads of data by default, this solution doesn't store anything other than the amount of active sessions a user has.
-
@xewl It works the same with shell scripts, if it gives an exit 1 the user is not authenticated and if it's exit 0 the user is good to go ;)
-
@xewl Me too and that was the main bug, returning the wrong exit code for hours 😅
It just reads a file, hardly any overheat :) -
Wack61916y@xewl actually exit status 0 is the convention (at least in C) for success: https://gnu.org/software/libc/...
After a few hours, I think I just got mysql based openvpn authentication working O_o
Fucking yay! Now let's implement a maximum amount of connections per user.
Yes, rants can be happy too.
rant