summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-07-21 15:11:50 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-07-21 15:11:50 +0800
commite1af6ca6e7cf02b5241f8a579ef4c43497fc2aa5 (patch)
tree2a804edea704f1f943dda47ba9d55ceedae8affd /util
parent9f7e9e14f8e55186e042f7120d039d8ce82ab142 (diff)
downloadpttbbs-e1af6ca6e7cf02b5241f8a579ef4c43497fc2aa5.tar
pttbbs-e1af6ca6e7cf02b5241f8a579ef4c43497fc2aa5.tar.gz
pttbbs-e1af6ca6e7cf02b5241f8a579ef4c43497fc2aa5.tar.bz2
pttbbs-e1af6ca6e7cf02b5241f8a579ef4c43497fc2aa5.tar.lz
pttbbs-e1af6ca6e7cf02b5241f8a579ef4c43497fc2aa5.tar.xz
pttbbs-e1af6ca6e7cf02b5241f8a579ef4c43497fc2aa5.tar.zst
pttbbs-e1af6ca6e7cf02b5241f8a579ef4c43497fc2aa5.zip
add attach_SHM()
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@1071 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'util')
-rw-r--r--util/bbsmail.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/util/bbsmail.c b/util/bbsmail.c
index 8e326ad7..7ef9435d 100644
--- a/util/bbsmail.c
+++ b/util/bbsmail.c
@@ -1,4 +1,4 @@
-/* $Id: bbsmail.c,v 1.7 2003/04/10 10:26:08 in2 Exp $ */
+/* $Id: bbsmail.c,v 1.8 2003/07/21 07:11:50 in2 Exp $ */
#define _UTIL_C_
#include "bbs.h"
@@ -243,18 +243,18 @@ main(int argc, char* argv[])
{
char receiver[512];
- if( passwd_mmap() )
- return 0;
- chdir(BBSHOME);
/* argv[1] is userid in bbs */
- if (argc < 2)
- {
+ if (argc < 2){
printf("Usage:\t%s <bbs_uid>\n", argv[0]);
exit(-1);
}
(void) setgid(BBSGID);
(void) setuid(BBSUID);
+ attach_SHM();
+ if( passwd_mmap() )
+ return 0;
+ chdir(BBSHOME);
strlcpy(receiver, argv[1], sizeof(receiver));