|
|
|
@ -15,6 +15,7 @@ import (
|
|
|
|
|
"net"
|
|
|
|
|
"os"
|
|
|
|
|
"os/signal"
|
|
|
|
|
osUser "os/user"
|
|
|
|
|
"runtime"
|
|
|
|
|
"strings"
|
|
|
|
|
"time"
|
|
|
|
@ -171,6 +172,19 @@ func main() {
|
|
|
|
|
log.Fatal("Can't use message type headline for groupchat messages.")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Get the current user.
|
|
|
|
|
currUser, err := osUser.Current()
|
|
|
|
|
if err != nil {
|
|
|
|
|
log.Fatal("Failed to get current user: ", err)
|
|
|
|
|
}
|
|
|
|
|
if currUser.Username == "root" {
|
|
|
|
|
fmt.Println("WARNING: It seems you are running go-sendxmpp as root user.\n" +
|
|
|
|
|
"This is is not recommended as go-sendxmpp does not require root " +
|
|
|
|
|
"privileges. Please consider using a less privileged user. For an " +
|
|
|
|
|
"example how to do this with sudo please consult the manpage chapter " +
|
|
|
|
|
"TIPS.")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch *flagSCRAMPinning {
|
|
|
|
|
case "", "SCRAM-SHA-1", "SCRAM-SHA-1-PLUS", "SCRAM-SHA-256", "SCRAM-SHA-256-PLUS",
|
|
|
|
|
"SCRAM-SHA-512", "SCRAM-SHA-512-PLUS":
|
|
|
|
|