Forbid running LURE as root
This commit is contained in:
parent
0ddf7777a9
commit
7483a00ecd
4
main.go
4
main.go
|
@ -57,6 +57,10 @@ func init() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
if os.Geteuid() == 0 {
|
||||||
|
log.Fatal("Running LURE as root is forbidden as it may cause catastrophic damage to your system").Send()
|
||||||
|
}
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
ctx, cancel := signal.NotifyContext(ctx, syscall.SIGINT, syscall.SIGTERM)
|
ctx, cancel := signal.NotifyContext(ctx, syscall.SIGINT, syscall.SIGTERM)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
|
@ -118,6 +118,10 @@ value = 'Compressing package'
|
||||||
id = 2952487371
|
id = 2952487371
|
||||||
value = 'Building package metadata'
|
value = 'Building package metadata'
|
||||||
|
|
||||||
|
[[translation]]
|
||||||
|
id = 3121791194
|
||||||
|
value = 'Running LURE as root is forbidden as it may cause catastrophic damage to your system'
|
||||||
|
|
||||||
[[translation]]
|
[[translation]]
|
||||||
id = 1579384326
|
id = 1579384326
|
||||||
value = 'name'
|
value = 'name'
|
||||||
|
|
|
@ -114,6 +114,10 @@ value = 'Сжатие пакета'
|
||||||
id = 2952487371
|
id = 2952487371
|
||||||
value = 'Создание метаданных пакета'
|
value = 'Создание метаданных пакета'
|
||||||
|
|
||||||
|
[[translation]]
|
||||||
|
id = 3121791194
|
||||||
|
value = 'Запуск LURE от имени root запрещен, так как это может привести к катастрофическому повреждению вашей системы'
|
||||||
|
|
||||||
[[translation]]
|
[[translation]]
|
||||||
id = 1579384326
|
id = 1579384326
|
||||||
value = 'название'
|
value = 'название'
|
||||||
|
|
Loading…
Reference in New Issue