S
Samuel Fine
(Disclaimer: First post, Ruby n00b, be gentle pls.)
Hello everyone. I'm in the process of writing a web app in Ruby, which
will be using /etc/shadow to handle user accounts and authentication.
I'm running into a bit of a problem though, as /etc/shadow's
permissions don't allow web scripts to access it. I was considering
using require to include an external .rb script written to access
shadow (as an external .rb script won't be handled by Apache, and won't
suffer from the permissions hindrance. But, I worry that using require
would just include the script into the file (sort of like PHP's
include()) and would nullify the advantage of using an external file.
So, to break this down into two simple questions:
1) What is the best (and simplest) way to access /etc/shadow using
eRuby?
2) Is require the only way to call an external script from within a
..rb/.rhtml file, and will doing so simply include the contents of the
called script in the new file?
Thanks!
Hello everyone. I'm in the process of writing a web app in Ruby, which
will be using /etc/shadow to handle user accounts and authentication.
I'm running into a bit of a problem though, as /etc/shadow's
permissions don't allow web scripts to access it. I was considering
using require to include an external .rb script written to access
shadow (as an external .rb script won't be handled by Apache, and won't
suffer from the permissions hindrance. But, I worry that using require
would just include the script into the file (sort of like PHP's
include()) and would nullify the advantage of using an external file.
So, to break this down into two simple questions:
1) What is the best (and simplest) way to access /etc/shadow using
eRuby?
2) Is require the only way to call an external script from within a
..rb/.rhtml file, and will doing so simply include the contents of the
called script in the new file?
Thanks!