remove colon

This commit is contained in:
Miek Gieben 2012-08-07 22:03:01 +02:00
parent 0bb09aad72
commit 57e09b572a

View File

@ -122,37 +122,37 @@ func configZONE(w dns.ResponseWriter, req *dns.Msg, t *dns.RR_TXT, c *Config) er
if len(sx) != 3 { if len(sx) != 3 {
return nil return nil
} }
logPrintf("config: READ %s %s\n", dns.Fqdn(sx[1]), sx[2]) logPrintf("config READ %s %s\n", dns.Fqdn(sx[1]), sx[2])
if e := c.ReadZoneFile(dns.Fqdn(sx[1]), sx[2]); e != nil { if e := c.ReadZoneFile(dns.Fqdn(sx[1]), sx[2]); e != nil {
logPrintf("failed to read %s: %s\n", sx[2], e.Error()) logPrintf("failed to read %s: %s\n", sx[2], e.Error())
return e return e
} }
logPrintf("config: added: READ %s %s\n", dns.Fqdn(sx[1]), sx[2]) logPrintf("config added: READ %s %s\n", dns.Fqdn(sx[1]), sx[2])
noerr(w, req) noerr(w, req)
case "READXFR": case "READXFR":
if len(sx) != 3 { if len(sx) != 3 {
return nil return nil
} }
logPrintf("config: READXFR %s %s\n", dns.Fqdn(sx[1]), sx[2]) logPrintf("config READXFR %s %s\n", dns.Fqdn(sx[1]), sx[2])
if e := c.ReadZoneXfr(dns.Fqdn(sx[1]), sx[2]); e != nil { if e := c.ReadZoneXfr(dns.Fqdn(sx[1]), sx[2]); e != nil {
logPrintf("failed to axfr %s: %s\n", sx[2], e.Error()) logPrintf("failed to axfr %s: %s\n", sx[2], e.Error())
return e return e
} }
logPrintf("config: added: READXFR %s %s\n", dns.Fqdn(sx[1]), sx[2]) logPrintf("config added: READXFR %s %s\n", dns.Fqdn(sx[1]), sx[2])
noerr(w, req) noerr(w, req)
case "DROP": case "DROP":
if len(sx) != 2 { if len(sx) != 2 {
return nil return nil
} }
logPrintf("config: DROP %s\n", dns.Fqdn(sx[1])) logPrintf("config DROP %s\n", dns.Fqdn(sx[1]))
if e := c.DropZone(dns.Fqdn(sx[1])); e != nil { if e := c.DropZone(dns.Fqdn(sx[1])); e != nil {
logPrintf("Failed to drop %s: %s\n", dns.Fqdn(sx[1]), e.Error()) logPrintf("Failed to drop %s: %s\n", dns.Fqdn(sx[1]), e.Error())
return e return e
} }
logPrintf("config: dropped: DROP %s\n", dns.Fqdn(sx[1])) logPrintf("config dropped: DROP %s\n", dns.Fqdn(sx[1]))
noerr(w, req) noerr(w, req)
case "LIST": case "LIST":
logPrintf("config: LIST\n") logPrintf("config LIST\n")
m := new(dns.Msg) m := new(dns.Msg)
m.SetReply(req) m.SetReply(req)
// Add the zones to the additional section // Add the zones to the additional section
@ -177,7 +177,7 @@ func configUSER(w dns.ResponseWriter, req *dns.Msg, t *dns.RR_TXT, c *Config) er
if len(sx) != 3 { if len(sx) != 3 {
return nil return nil
} }
logPrintf("config: ADD %s with %s\n", dns.Fqdn(sx[1]), sx[2]) logPrintf("config ADD %s with %s\n", dns.Fqdn(sx[1]), sx[2])
c.Server.TsigSecret[dns.Fqdn(sx[1])] = sx[2] c.Server.TsigSecret[dns.Fqdn(sx[1])] = sx[2]
c.Rights[dns.Fqdn(sx[1])] = R_NONE c.Rights[dns.Fqdn(sx[1])] = R_NONE
noerr(w, req) noerr(w, req)
@ -185,13 +185,13 @@ func configUSER(w dns.ResponseWriter, req *dns.Msg, t *dns.RR_TXT, c *Config) er
if len(sx) != 2 { if len(sx) != 2 {
return nil return nil
} }
logPrintf("config: DROP %s\n", dns.Fqdn(sx[1])) logPrintf("config DROP %s\n", dns.Fqdn(sx[1]))
delete(c.Server.TsigSecret, dns.Fqdn(sx[1])) delete(c.Server.TsigSecret, dns.Fqdn(sx[1]))
delete(c.Rights, dns.Fqdn(sx[1])) delete(c.Rights, dns.Fqdn(sx[1]))
noerr(w, req) noerr(w, req)
case "LIST": case "LIST":
for u, p := range c.Server.TsigSecret { for u, p := range c.Server.TsigSecret {
logPrintf("config: USER %s: %s\n", u, p) logPrintf("config USER %s: %s\n", u, p)
} }
fallthrough fallthrough
case "ADDRIGHT": case "ADDRIGHT":