📄 changeuid.hh
字号:
// -*- mode: c++; c-basic-offset: 4 -*-#ifndef CLICK_CHANGEUID_HH#define CLICK_CHANGEUID_HH#include <click/element.hh>#include <click/timer.hh>CLICK_DECLS/*=cChangeUID()=s userlevelrelinquish root privilege=ioNone=dSets the current process's effective user and group IDs to its real user andgroup IDs, respectively. This relinquishes any set-uid-root privilege.=nChangeUID's configure phase is set so that it runs immediately after the"privileged" elements FromDevice.u and ToDevice.u, but before most otherelements. Thus, this configuration: f1 :: FromDevice(eth0) -> ... f2 :: FromDump(/tmp/x) -> ... ChangeUID()should fail to initialize if the user cannot read file F</tmp/x>. However,your mileage may vary. Set-uid-root programs are a bad idea, and Click is noexception.*/class ChangeUID : public Element { public: ChangeUID(); ~ChangeUID(); const char *class_name() const { return "ChangeUID"; } int configure_phase() const { return CONFIGURE_PHASE_PRIVILEGED+1; } int initialize(ErrorHandler *);};CLICK_ENDDECLS#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -