It is possible to change the command line arguments, but how you do it is simply platform specific. You can look at how Nginx or PostgreSQL do it, just to name a few programs that need to change the command line to help user identity the role of each child process.
Manlio Il giorno mercoledì 22 giugno 2016 03:56:21 UTC+2, Lazytiger ha scritto: > > Thanks for all the replies. I agree that there is a better way to do the > security jobs. I ask this question just for curiosity, to find out if there > is a equivalence way to do this in golang. From all the replies I assume > there is a no. > > 在 2016年6月21日,下午10:39,Matt Harden <matt....@gmail.com <javascript:>> 写道: > > It's generally a bad idea to try to improve security by hiding args. Much > better to pass the argument another way, for instance via an open file > descriptor that the program reads the value from. > > On Tue, Jun 21, 2016, 07:16 Hoping White <baiha...@gmail.com <javascript:>> > wrote: > >> Hi, all >> >> I wonder is there a way to hide command line arguments from programs >> like “ps”? I can rewrite argv parameter for main in c language, or use >> LD_PRELOAD to intercept libc_start_main, but all these methods do not be >> functional in go. Thanks. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "golang-nuts" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to golang-nuts...@googlegroups.com <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.