On Wed, 19 Jan 2005, Ivan M. wrote: >I hate to beat a horse to death (especially the rescue horse my wife >just got) but this whole class of potential errors by Oort can be >avoided with a single line of code at the beginning of main() in the >bincimapd.cc file: > if (!geteuid() || !getuid()) return 111; >This solves the problem for all compiler/OS combinations. >I must admit I did smile when I read this post, but I promise I didn't >put him up to it!
I thought Peter made it clear that the variables must be initialized. My remark was about whether or not certain compilers initialize the variables. The compiler is free to do so, and most C compilers do. Most C++ compilers don't, and in particular MSVC++ initializes the variable as garbage. I understand everything you're saying, and I know you want to disallow root from running bincimapd, but it's not going to happen. Andy :-) -- Andreas Aardal Hanssen | http://www.andreas.hanssen.name/gpg Author of Binc IMAP | "It is better not to do something http://www.bincimap.org/ | than to do it poorly."
