diff options
author | Mattias Andrée <maandree@operamail.com> | 2015-08-22 01:27:27 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2015-08-22 01:27:27 +0200 |
commit | e5db9ec4d879b6463bafa19a492c710b9113dc86 (patch) | |
tree | 507df4d57f48e78f55953e58cca5acf189a5fe36 /src | |
parent | ensure that all PF_ and AF_ aliases exists if any exist (diff) | |
download | mds-e5db9ec4d879b6463bafa19a492c710b9113dc86.tar.gz mds-e5db9ec4d879b6463bafa19a492c710b9113dc86.tar.bz2 mds-e5db9ec4d879b6463bafa19a492c710b9113dc86.tar.xz |
the first argument on socket() should be PF_, not AF_ as often documented, although it does not really matter because PF_ to AF_ is a bijective identity mapping (PF_UNSPEC was even added to make this true.)
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/mds.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -186,7 +186,7 @@ int main(int argc_, char** argv_) address.sun_family = AF_UNIX; strcpy(address.sun_path, pathname); unlink(pathname); - fail_if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0); + fail_if ((fd = socket(PF_UNIX, SOCK_STREAM, 0)) < 0); fail_if (fchmod(fd, S_IRWXU) < 0); fail_if (bind(fd, (struct sockaddr*)(&address), sizeof(address)) < 0); fail_if (chown(pathname, getuid(), NOBODY_GROUP_GID) < 0); |