|
|
|
@ -23,16 +23,16 @@ package clientconfig |
|
|
|
import ( |
|
|
|
import ( |
|
|
|
"io/ioutil" |
|
|
|
"io/ioutil" |
|
|
|
"os" |
|
|
|
"os" |
|
|
|
"os/exec" |
|
|
|
|
|
|
|
"path/filepath" |
|
|
|
"path/filepath" |
|
|
|
"strconv" |
|
|
|
"strconv" |
|
|
|
"strings" |
|
|
|
"strings" |
|
|
|
"time" |
|
|
|
"time" |
|
|
|
|
|
|
|
|
|
|
|
"github.com/ProtonMail/proton-bridge/v2/internal/bridge" |
|
|
|
"github.com/ProtonMail/proton-bridge/internal/bridge" |
|
|
|
"github.com/ProtonMail/proton-bridge/v2/internal/config/useragent" |
|
|
|
"github.com/ProtonMail/proton-bridge/internal/config/useragent" |
|
|
|
"github.com/ProtonMail/proton-bridge/v2/internal/frontend/types" |
|
|
|
"github.com/ProtonMail/proton-bridge/internal/frontend/types" |
|
|
|
"github.com/ProtonMail/proton-bridge/v2/pkg/mobileconfig" |
|
|
|
"github.com/ProtonMail/proton-bridge/pkg/mobileconfig" |
|
|
|
|
|
|
|
"golang.org/x/sys/execabs" |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
const ( |
|
|
|
const ( |
|
|
|
@ -56,10 +56,10 @@ func (c *appleMail) Configure(imapPort, smtpPort int, imapSSL, smtpSSL bool, use |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if useragent.IsBigSurOrNewer() { |
|
|
|
if useragent.IsBigSurOrNewer() { |
|
|
|
return exec.Command("open", bigSurPreferncesPane, confPath).Run() //nolint:gosec G204: open command is safe, mobileconfig is generated by us
|
|
|
|
return execabs.Command("open", bigSurPreferncesPane, confPath).Run() //nolint:gosec G204: open command is safe, mobileconfig is generated by us
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return exec.Command("open", confPath).Run() //nolint:gosec G204: open command is safe, mobileconfig is generated by us
|
|
|
|
return execabs.Command("open", confPath).Run() //nolint:gosec G204: open command is safe, mobileconfig is generated by us
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func prepareMobileConfig(imapPort, smtpPort int, imapSSL, smtpSSL bool, user types.User, address string) *mobileconfig.Config { |
|
|
|
func prepareMobileConfig(imapPort, smtpPort int, imapSSL, smtpSSL bool, user types.User, address string) *mobileconfig.Config { |
|
|
|
|