Loading ...
Sorry, an error occurred while loading the content.

6184Permissions and processes

Expand Messages
  • roparzhhemon
    Jul 2, 2006
    • 0 Attachment
      Hello all,

      there's an issue I'm still confused about although I read the Unix
      module documentation about it several times, probably
      because I couldn't simple code samples.

      My question is : can you create within Ocaml a function

      execute_with_perm : string->string->process_status

      (in the vein of Unix.system)

      such that

      execute_with_perm comm passwd

      executes the command comm, providing the
      password passwd to gain the right to do it ?

      For example,

      execute_with_perm "sudo doSomethingDangerous" "abracada"
      would allow the (currently logged) user whose passwd is "abracada" to execute
      the command "doSomethingDangerous".

    • Show all 4 messages in this topic