1

I'm trying to call the crypt system call from Ruby. Ruby has a Kernel#syscall method (http://ruby-doc.org/core-2.3.0/Kernel.html#method-i-syscall), but it needs the number of the system call, not the name. I have found many lists of system call numbers, but none of them include crypt.

Any ideas how I call it?

Thanks!

Matt Parlane
  • 453
  • 2
  • 11
  • You need to tell us your OS/kernel and architecture. Anyway neither Linux nor *BSD has such a syscall. – cremno Apr 29 '16 at 01:41
  • 1
    Are you by chance referencing the posix libc function `crypt`? http://man7.org/linux/man-pages/man3/crypt.3.html – photoionized Apr 29 '16 at 04:28
  • You need to look up the syscall numbers for the specific version of the specific kernel of the specific operating system you are using. Since you do not tell us what those are, we cannot help you. Note, however, that I do not know of any well-known kernel which has a `crypt` syscall. – Jörg W Mittag Apr 29 '16 at 08:28
  • @photoionized Yes, I guess I am. Not being a C programmer I obviously don't get the difference between a syscall and a library function... is it not possible to call `crypt` in the same way as a syscall? – Matt Parlane Apr 29 '16 at 08:39

0 Answers0