Fix some issue.
Add some privilege check.

Signed-off-by: robertzml <robertzml@126.com>