Skip to content

Commit

Permalink
Minor fixes in error formatting and chgrp logging
Browse files Browse the repository at this point in the history
  • Loading branch information
rufferson committed Oct 27, 2020
1 parent 17086ac commit bb5ff9e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/DJabberd.pm
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ sub _start_server {
if(lc($1) eq 'g') {
my ($gn,undef,$gid,$mm) = getgrnam($2);
my $un = getpwuid($<);
$logger->debug("Need to chgrp $sock to $gn/$gid: $un should be in '$mm' or $< == 0");
$logger->debug("Need to chgrp $sock to $gn/$gid: $un should be in members($mm) or EUID[$<] == 0");
if($<==0 || grep{$_ eq $un}split('\s+',$mm)) {
chown(-1, $gid, $sock) or $logger->logdie("Error changing group: $@\n");
if(!($stat[2] & 020)) {
Expand Down
3 changes: 2 additions & 1 deletion lib/DJabberd/Stanza.pm
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,8 @@ sub make_error_response {
"{}type" => $type,
},
[
ref $error ? $error : new DJabberd::XMLElement("urn:ietf:params:xml:ns:xmpp-stanzas", $error, {}, []),
ref $error ? $error : new DJabberd::XMLElement("urn:ietf:params:xml:ns:xmpp-stanzas", $error,
{xmlns=>'urn:ietf:params:xml:ns:xmpp-stanzas'}, []),
],
);

Expand Down

0 comments on commit bb5ff9e

Please sign in to comment.