packages/net/crowdsec/patches/010-fix-32bits-compile.patch
Kerma Gérald 8903d1b7ca crowdsec: initial package v1.2.0
/net/crowdsec/

Crowdsec - An open-source, lightweight agent to detect
 and respond to bad behaviours.
 It also automatically benefits from a global community-wide
 IP reputation database.

Signed-off-by: Kerma Gérald <gandalf@gk2.net>
2021-10-09 11:53:18 +02:00

29 lines
810 B
Diff

Author: Kerma Gérald <gandalf@gk2.net>
Date: Mon Sep 20 10:34:20 2021 +0200
Use math.MaxInt32 instead of math.MaxUint32
To fix 32 bits compilation in v1.2.0
https://github.com/crowdsecurity/crowdsec/issues/979
Signed-off-by: Kerma Gérald <gandalf@gk2.net>
--- a/pkg/csplugin/broker.go
+++ b/pkg/csplugin/broker.go
@@ -400,14 +400,14 @@ func getProccessAtr(username string, gro
if err != nil {
return nil, err
}
- if uid < 0 && uid > math.MaxUint32 {
+ if uid < 0 && uid > math.MaxInt32 {
return nil, fmt.Errorf("out of bound uid")
}
gid, err := strconv.Atoi(g.Gid)
if err != nil {
return nil, err
}
- if gid < 0 && gid > math.MaxUint32 {
+ if gid < 0 && gid > math.MaxInt32 {
return nil, fmt.Errorf("out of bound gid")
}
return &syscall.SysProcAttr{